-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADD/#6] Design System 기초세팅 #7
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
807fb69
[CHORE/#6] 패키지 이름 ui -> designsystem 수정
Hyobeen-Park cb0f98c
[FEAT/#6] Color 추가
Hyobeen-Park 723fa1a
[ADD/#6] 폰트 추가
Hyobeen-Park 7a9c753
[FEAT/#6] 타이포 추가
Hyobeen-Park 99c6461
[FEAT/#6] typography class 함수 추가
Hyobeen-Park c33d2c8
[FEAT/#6] theme 설정
Hyobeen-Park 3b807b4
[CHORE/#6] font 속성 수정
Hyobeen-Park e020353
[CHORE/#6] 코드 정리
Hyobeen-Park d6a2076
[CHORE/#6] import 수정
Hyobeen-Park File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
core/src/main/java/com/terning/core/designsystem/theme/Color.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.terning.core.designsystem.theme | ||
|
||
import androidx.compose.ui.graphics.Color | ||
|
||
// Grey Scale | ||
val White = Color(0xFFFFFFFF) | ||
val Grey100 = Color(0xFFF5F5F5) | ||
val Grey150 = Color(0xFFE9E9E9) | ||
val Grey200 = Color(0xFFDDDDDD) | ||
val Grey300 = Color(0xFFBCBCBC) | ||
val Grey350 = Color(0xFFADADAD) | ||
val Grey400 = Color(0xFF666666) | ||
val Grey500 = Color(0xFF373737) | ||
val Black = Color(0xFF171717) | ||
|
||
// Main Color | ||
val TerningMain = Color(0xFF1EA65E) | ||
|
||
// Calendar Color | ||
val CalRed = Color(0xFFED4E54) | ||
|
||
val CalOrange1 = Color(0xFFEE7647) | ||
val CalOrange2 = Color(0xFF5397F3) | ||
|
||
val CalYellow = Color(0xFFF5E660) | ||
|
||
val CalGreen1 = Color(0xFFC4E953) | ||
val CalGreen2 = Color(0xFF84D558) | ||
|
||
val CalBlue1 = Color(0xFF45D0CC) | ||
val CalBlue2 = Color(0xFF4119F2) | ||
|
||
val CalPurple = Color(0xFF9B64E2) | ||
|
||
val CalPink = Color(0xFFF260AC) | ||
|
||
// Other | ||
val WarningRed = Color(0xFFF54645) | ||
val SundayRed = Color(0xFFEB1211) |
51 changes: 51 additions & 0 deletions
51
core/src/main/java/com/terning/core/designsystem/theme/Theme.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.terning.core.designsystem.theme | ||
|
||
import androidx.compose.foundation.isSystemInDarkTheme | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.lightColorScheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.CompositionLocalProvider | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.staticCompositionLocalOf | ||
|
||
private val LightColorScheme = lightColorScheme( | ||
primary = TerningMain, | ||
) | ||
|
||
private val LocalTerningTypography = staticCompositionLocalOf<TerningTypography> { | ||
error("No TerningTypography provided") | ||
} | ||
|
||
object TerningTheme { | ||
val typography: TerningTypography | ||
@Composable | ||
get() = LocalTerningTypography.current | ||
} | ||
|
||
@Composable | ||
fun ProvideTerningTypography(typography: TerningTypography, content: @Composable () -> Unit) { | ||
val provideTypography = remember { typography.copy() } | ||
provideTypography.update(typography) | ||
CompositionLocalProvider( | ||
LocalTerningTypography provides provideTypography, | ||
content = content | ||
) | ||
} | ||
|
||
@Composable | ||
fun TerningTheme( | ||
darkTheme: Boolean = isSystemInDarkTheme(), | ||
// Dynamic color is available on Android 12+ | ||
dynamicColor: Boolean = true, | ||
content: @Composable () -> Unit | ||
) { | ||
val colorScheme = LightColorScheme | ||
val typography = TerningTypography() | ||
|
||
ProvideTerningTypography(typography = typography) { | ||
MaterialTheme( | ||
colorScheme = colorScheme, | ||
content = content, | ||
) | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정 감사합니당~!