Hi, I’m looking to provide a replacement typograph...
# compose
j
Hi, I’m looking to provide a replacement typography system and i’ve provided it like this:
Copy code
@Composable
fun CustomTheme(
    content: @Composable () -> Unit
) {
    MaterialTheme(
        colors = LightColorPalette,
        shapes = Shapes,
    ) {
        CompositionLocalProvider(
            LocalRippleTheme provides CustomRippleTheme,
            LocalCustomTypography provides CustomTypography(),
            content = content
        )
    }
}

object CustomTheme {

    val typography: CustomTypography
        @Composable
        get() = LocalCustomTypography.current
}
rather than the convention seen in the docs:
Copy code
@Composable
fun CustomTheme(
    content: @Composable () -> Unit
) {
    CompositionLocalProvider(
        LocalRippleTheme provides CustomRippleTheme,
        LocalCustomTypography provides CustomTypography(),
    ) {
        MaterialTheme(
            colors = LightColorPalette,
            shapes = Shapes,
            content = content
        )
    }
}
// ...
Are there any problems with using this style over the one in the docs?