Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstyl committed Oct 31, 2024
1 parent b2bbe33 commit f1ea7ea
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/modal-bottom-sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,18 @@ ModalBottomSheet(rememberModalBottomSheetState(initialDetent = SheetDetent.Fully
val window = LocalModalWindow.current
LaunchedEffect(Unit) {
// change system bars to transparent
window.navigationBarColor = Color.Transparent.toArgb()
window.statusBarColor = Color.Transparent.toArgb()
window.navigationBarColor = Color.Black.copy(0.33f).toArgb()

// don't forget to update the icons too
WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = true
WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightNavigationBars = true
val windowInsetsController = WindowInsetsControllerCompat(window, window.decorView)
windowInsetsController.isAppearanceLightStatusBars = true
windowInsetsController.isAppearanceLightNavigationBars = false
}
BasicText("Transparent status bar, darkened navbars. Easy-peazy 😎 ", modifier = Modifier.navigationBarsPadding())
BasicText(
"Transparent status bar, darkened navbars. Easy-peazy 😎 ",
modifier = Modifier.navigationBarsPadding()
)
}
}
```
Expand Down

0 comments on commit f1ea7ea

Please sign in to comment.