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
@Composable | |
fun TiaraElmTheme( | |
colors: TiaraElmColors = TiaraElmTheme.colors, | |
typography: TiaraElmTypography = TiaraElmTheme.typography, | |
content: @Composable () -> Unit | |
) { | |
CompositionLocalProvider( | |
LocalColors provides colors, | |
LocalTypography provides typography, | |
) { |
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
object TiaraElmTheme { | |
// Retrieves the current colors | |
val colors: TiaraElmColors | |
@Composable | |
@ReadOnlyComposable | |
get() = LocalColors.current | |
// Retrieves the current typography | |
val typography: TiaraElmTypography |
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
val LocalTypography = staticCompositionLocalOf { tiaraElmTypography } | |
val LocalColors = staticCompositionLocalOf { tiaraElmDefaultLightColors } |
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
val robotoFontFamily = FontFamily( | |
Font(R.font.roboto_light, FontWeight.W100), | |
Font(R.font.roboto_medium, FontWeight.W400), | |
) | |
val tiaraElmTypography = | |
TiaraElmTypography( | |
maria = TextStyle( | |
fontFamily = robotoFontFamily, | |
fontWeight = FontWeight.W400, |
NewerOlder