mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 23:47:02 +05:30
TodoTheme: strip out all custom theming
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
91fc3aa9fa
commit
bfd060e66e
1 changed files with 0 additions and 44 deletions
|
@ -1,55 +1,11 @@
|
|||
package dev.msfjarvis.todo.ui
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Typography
|
||||
import androidx.compose.material.darkColors
|
||||
import androidx.compose.material.lightColors
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextIndent
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
val lightColors = lightColors(
|
||||
primary = Color.White,
|
||||
secondary = Color(0xFF3700B3),
|
||||
background = Color.White,
|
||||
surface = Color.White,
|
||||
onPrimary = Color.Black,
|
||||
onSecondary = Color.White,
|
||||
onBackground = Color.Black,
|
||||
onSurface = Color.White,
|
||||
)
|
||||
val darkColors = darkColors(
|
||||
primary = Color(0xFF121212),
|
||||
secondary = Color(0xFFBB86FC),
|
||||
background = Color.Black,
|
||||
surface = Color(0xFF121212),
|
||||
onPrimary = Color.White,
|
||||
onSecondary = Color.White,
|
||||
onBackground = Color.White,
|
||||
onSurface = Color.White,
|
||||
)
|
||||
|
||||
private val typography = Typography(
|
||||
body1 = TextStyle(
|
||||
fontFamily = FontFamily.Serif,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 20.sp,
|
||||
textIndent = TextIndent(firstLine = 16.sp),
|
||||
textAlign = TextAlign.Justify
|
||||
)
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun TodoTheme(children: @Composable () -> Unit) {
|
||||
MaterialTheme(
|
||||
colors = if (isSystemInDarkTheme()) darkColors else lightColors,
|
||||
content = children,
|
||||
typography = typography,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue