Closed marcorighini closed 2 years ago
We have
@Composable private fun DarkModeComponentCard(metadata: ShowkaseBrowserComponent) { val customConfiguration = Configuration(LocalConfiguration.current).apply { uiMode = Configuration.UI_MODE_NIGHT_YES } ComponentCardTitle("${metadata.componentName} [Dark Mode]") CompositionLocalProvider(LocalConfiguration provides customConfiguration) { ComponentCard(metadata) } }
But for the other cards (that are expected to be in light mode) we are not overriding the mode to light, i.e. uiMode = Configuration.UI_MODE_NIGHT_NO.
uiMode = Configuration.UI_MODE_NIGHT_NO
For this reason, if the system is already in dark mode all the cards are showing the dark mode variant.
Possible fix https://github.com/airbnb/Showkase/pull/223
Fixed! Thank you for your contribution @marcorighini
We have
But for the other cards (that are expected to be in light mode) we are not overriding the mode to light, i.e.
uiMode = Configuration.UI_MODE_NIGHT_NO
.For this reason, if the system is already in dark mode all the cards are showing the dark mode variant.