Skip to content

Commit d7b826b

Browse files
authored
Fixed samples that have compilation errors (#513)
1 parent 670dddc commit d7b826b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/navigation/tab-navigation.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ You can use it with a [Scaffold](https://developer.android.com/reference/kotlin/
4646
setContent {
4747
TabNavigator(HomeTab) {
4848
Scaffold(
49-
content = {
50-
CurrentTab()
49+
content = { padding ->
50+
Box(modifier = Modifier.padding(padding)) {
51+
CurrentTab()
52+
}
5153
},
5254
bottomBar = {
5355
BottomNavigation {
@@ -74,7 +76,7 @@ private fun RowScope.TabNavigationItem(tab: Tab) {
7476
BottomNavigationItem(
7577
selected = tabNavigator.current == tab,
7678
onClick = { tabNavigator.current = tab },
77-
icon = { Icon(painter = tab.icon, contentDescription = tab.title) }
79+
icon = { Icon(painter = tab.options.icon!!, contentDescription = tab.options.title) }
7880
)
7981
}
8082
```

0 commit comments

Comments
 (0)