Skip to content

Commit a881ec9

Browse files
committed
Update material bottom tabs docs
1 parent 6e8c609 commit a881ec9

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

versioned_docs/version-5.x/material-bottom-tab-navigator.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ Custom color for icon and label in the inactive tab.
8888

8989
#### `barStyle`
9090

91-
Style for the bottom navigation bar. You can set a bottom padding here if you have a translucent navigation bar on Android: `barStyle={{ paddingBottom: 48 }}`.
92-
93-
Example:
91+
Style for the bottom navigation bar. You can pass custom background color here:
9492

9593
<samp id="material-bottom-tab-styled" />
9694

@@ -105,6 +103,19 @@ Example:
105103
</Tab.Navigator>
106104
```
107105

106+
If you have a translucent navigation bar on Android, you can also set a bottom padding here:
107+
108+
```js
109+
<Tab.Navigator
110+
initialRouteName="Home"
111+
activeColor="#f0edf6"
112+
inactiveColor="#3e2465"
113+
barStyle={{ paddingBottom: 48 }}
114+
>
115+
{/* ... */}
116+
</Tab.Navigator>
117+
```
118+
108119
### Options
109120

110121
The following [options](screen-options.md) can be used to configure the screens in the navigator:
@@ -156,7 +167,7 @@ To prevent the default behavior, you can call `event.preventDefault`:
156167

157168
```js
158169
React.useEffect(() => {
159-
const unsubscribe = navigation.addListener('tabPress', e => {
170+
const unsubscribe = navigation.addListener('tabPress', (e) => {
160171
// Prevent default behavior
161172

162173
e.preventDefault();

0 commit comments

Comments
 (0)