Jan Skrasek
09/07/2021, 10:44 AMpublic enum class ContentEmphasis { Normal, Minor, Subtle, Disabled }
public val LocalContentEmphasis: ProvidableCompositionLocal<ContentEmphasis> = compositionLocalOf { ContentEmphasis.Normal }
then using it like this
fun Foo(label: @Composable () -> Unit) {
CompositionLocalProvider(LocalContentEmphasis provides ContentEmphasis.Minor) {
label()
}
}
seems that components in label doesn't have the value changed.
Did something changed? Or is my code wrong in some way?Jan Skrasek
09/07/2021, 12:06 PMJan Skrasek
09/07/2021, 1:36 PMCompositionLocalProvider(
LocalTextStyle provides OrbitTheme.typography.bodySmall,
LocalContentColor provides OrbitTheme.colors.content.normal,
) {
CompositionLocalProvider(
LocalContentEmphasis provides if (enabled) ContentEmphasis.Minor else ContentEmphasis.Disabled,
) {
description()
}
}
Still, not able to reproduce in different project.Lorenzo Benevento
09/07/2021, 5:50 PMJan Skrasek
09/07/2021, 5:59 PMJan Skrasek
09/07/2021, 5:59 PMJan Skrasek
09/07/2021, 6:03 PMLorenzo Benevento
09/07/2021, 6:06 PMJan Skrasek
09/07/2021, 7:19 PMJan Skrasek
09/09/2021, 12:05 PM