-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
255 additions
and
125 deletions.
There are no files selected for viewing
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
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
11 changes: 0 additions & 11 deletions
11
app/src/main/java/com/withpeace/withpeace/ui/theme/Color.kt
This file was deleted.
Oops, something went wrong.
70 changes: 0 additions & 70 deletions
70
app/src/main/java/com/withpeace/withpeace/ui/theme/Theme.kt
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
app/src/main/java/com/withpeace/withpeace/ui/theme/Type.kt
This file was deleted.
Oops, something went wrong.
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
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 @@ | ||
/build |
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,9 @@ | ||
plugins { | ||
id("com.android.library") | ||
id("convention.android.base") | ||
id("convention.android.compose") | ||
} | ||
|
||
android { | ||
namespace = "com.withpeace.withpeace.core.designsystem" | ||
} |
Empty file.
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
39 changes: 39 additions & 0 deletions
39
core/designsystem/src/main/java/com/withpeace/withpeace/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.withpeace.withpeace.core.designsystem.theme | ||
|
||
import androidx.compose.ui.graphics.Color | ||
|
||
val Purple80 = Color(0xFFD0BCFF) | ||
val PurpleGrey80 = Color(0xFFCCC2DC) | ||
val Pink80 = Color(0xFFEFB8C8) | ||
|
||
val Purple40 = Color(0xFF6650a4) | ||
val PurpleGrey40 = Color(0xFF625b71) | ||
val Pink40 = Color(0xFF7D5260) | ||
|
||
val mainpink = Color(0xFFFEA0A1) | ||
val subPink = Color(0xFFF5D6DB) | ||
val subApricot = Color(0xFFFED9C9) | ||
val subBlue = Color(0xFFDFF2F9) | ||
|
||
val systemBlack = Color(0xFF212529) | ||
val systemGray1 = Color(0xFF3D3D3D) | ||
val systemGray2 = Color(0xFFA7A7A7) | ||
val systemGray3 = Color(0xFFECECEF) | ||
val systemError = Color(0xFFF0474B) | ||
val systemSuccess = Color(0xFF3BD569) | ||
|
||
data class WithPeaceColor( | ||
val MainPink: Color = mainpink, | ||
val SubPink: Color = subPink, | ||
val SubApricot: Color = subApricot, | ||
val SubBlue: Color = subBlue, | ||
val SystemBlack: Color = systemBlack, | ||
val SystemGray1: Color = systemGray1, | ||
val SystemGray2: Color = systemGray2, | ||
val SystemGray3: Color = systemGray3, | ||
val SystemError: Color = systemError, | ||
val SystemSuccess: Color = systemSuccess, | ||
) | ||
|
||
val lightColor = WithPeaceColor() | ||
val darkColor = WithPeaceColor() |
9 changes: 9 additions & 0 deletions
9
core/designsystem/src/main/java/com/withpeace/withpeace/core/designsystem/theme/Padding.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,9 @@ | ||
package com.withpeace.withpeace.core.designsystem.theme | ||
|
||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
|
||
data class WithPeacePadding( | ||
val BasicHorizontalPadding: Dp = 24.dp, | ||
val BasicContentPadding: Dp = 8.dp, | ||
) |
50 changes: 50 additions & 0 deletions
50
core/designsystem/src/main/java/com/withpeace/withpeace/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,50 @@ | ||
package com.withpeace.withpeace.core.designsystem.theme | ||
|
||
import androidx.compose.foundation.isSystemInDarkTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.CompositionLocalProvider | ||
import androidx.compose.runtime.staticCompositionLocalOf | ||
|
||
val LocalCustomColors = | ||
staticCompositionLocalOf { | ||
WithPeaceColor() | ||
} | ||
|
||
val LocalCustomTypography = | ||
staticCompositionLocalOf { | ||
WithPeaceTypography() | ||
} | ||
val LocalCustomPadding = | ||
staticCompositionLocalOf { | ||
WithPeacePadding() | ||
} | ||
|
||
@Composable | ||
fun WithpeaceTheme( | ||
darkTheme: Boolean = isSystemInDarkTheme(), | ||
content: @Composable () -> Unit, | ||
) { | ||
val colorScheme = | ||
when { | ||
darkTheme -> darkColor | ||
else -> lightColor | ||
} | ||
CompositionLocalProvider( | ||
LocalCustomColors provides colorScheme, | ||
LocalCustomTypography provides WithPeaceTypography(), | ||
LocalCustomPadding provides WithPeacePadding(), | ||
content = content, | ||
) | ||
} | ||
|
||
object WithpeaceTheme { | ||
val colors: WithPeaceColor | ||
@Composable | ||
get() = LocalCustomColors.current | ||
val typography: WithPeaceTypography | ||
@Composable | ||
get() = LocalCustomTypography.current | ||
val padding: WithPeacePadding | ||
@Composable | ||
get() = LocalCustomPadding.current | ||
} |
Oops, something went wrong.