parent
df1349c089
commit
8e527cf491
@ -1,44 +0,0 @@ |
||||
package com.gyf.csams.uikit.theme |
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme |
||||
import androidx.compose.material.MaterialTheme |
||||
import androidx.compose.material.darkColors |
||||
import androidx.compose.material.lightColors |
||||
import androidx.compose.runtime.Composable |
||||
|
||||
private val DarkColorPalette = darkColors( |
||||
primary = Purple200, |
||||
primaryVariant = Purple700, |
||||
secondary = Teal200 |
||||
) |
||||
|
||||
private val LightColorPalette = lightColors( |
||||
primary = Purple500, |
||||
primaryVariant = Purple700, |
||||
secondary = Teal200 |
||||
|
||||
/* Other default colors to override |
||||
background = Color.White, |
||||
surface = Color.White, |
||||
onPrimary = Color.White, |
||||
onSecondary = Color.Black, |
||||
onBackground = Color.Black, |
||||
onSurface = Color.Black, |
||||
*/ |
||||
) |
||||
|
||||
@Composable |
||||
fun CSAMSTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable() () -> Unit) { |
||||
val colors = if (darkTheme) { |
||||
DarkColorPalette |
||||
} else { |
||||
LightColorPalette |
||||
} |
||||
|
||||
MaterialTheme( |
||||
colors = colors, |
||||
typography = Typography, |
||||
shapes = Shapes, |
||||
content = content |
||||
) |
||||
} |
@ -1,8 +0,0 @@ |
||||
package com.gyf.csams.uikit.theme |
||||
|
||||
import androidx.compose.ui.graphics.Color |
||||
|
||||
val Purple200 = Color(0xFFBB86FC) |
||||
val Purple500 = Color(0xFF6200EE) |
||||
val Purple700 = Color(0xFF3700B3) |
||||
val Teal200 = Color(0xFF03DAC5) |
@ -1,11 +0,0 @@ |
||||
package com.gyf.csams.uikit.theme |
||||
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape |
||||
import androidx.compose.material.Shapes |
||||
import androidx.compose.ui.unit.dp |
||||
|
||||
val Shapes = Shapes( |
||||
small = RoundedCornerShape(4.dp), |
||||
medium = RoundedCornerShape(4.dp), |
||||
large = RoundedCornerShape(0.dp) |
||||
) |
@ -1,28 +0,0 @@ |
||||
package com.gyf.csams.uikit.theme |
||||
|
||||
import androidx.compose.material.Typography |
||||
import androidx.compose.ui.text.TextStyle |
||||
import androidx.compose.ui.text.font.FontFamily |
||||
import androidx.compose.ui.text.font.FontWeight |
||||
import androidx.compose.ui.unit.sp |
||||
|
||||
// Set of Material typography styles to start with |
||||
val Typography = Typography( |
||||
body1 = TextStyle( |
||||
fontFamily = FontFamily.Default, |
||||
fontWeight = FontWeight.Normal, |
||||
fontSize = 16.sp |
||||
) |
||||
/* Other default text styles to override |
||||
button = TextStyle( |
||||
fontFamily = FontFamily.Default, |
||||
fontWeight = FontWeight.W500, |
||||
fontSize = 14.sp |
||||
), |
||||
caption = TextStyle( |
||||
fontFamily = FontFamily.Default, |
||||
fontWeight = FontWeight.Normal, |
||||
fontSize = 12.sp |
||||
) |
||||
*/ |
||||
) |
@ -1,10 +1,11 @@ |
||||
package com.gyf.csams.uikit.theme |
||||
package com.gyf.lib.uikit.theme |
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme |
||||
import androidx.compose.material.MaterialTheme |
||||
import androidx.compose.material.darkColors |
||||
import androidx.compose.material.lightColors |
||||
import androidx.compose.runtime.Composable |
||||
import com.gyf.csams.uikit.theme.* |
||||
|
||||
private val DarkColorPalette = darkColors( |
||||
primary = Purple200, |
Loading…
Reference in new issue