TodoTheme: remove typography customizations

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-09-08 05:36:30 +05:30
parent b7124e5bda
commit 8df3db3607
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -2,17 +2,10 @@ 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,
@ -35,21 +28,10 @@ val darkColors = darkColors(
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,
)
}