Skip to content

Commit d2d0fd0

Browse files
committed
Document tabBarBadge for material bottom tabs
1 parent e1c7d0a commit d2d0fd0

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

docs/material-bottom-tab-navigator.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ Color for the tab bar when the tab corresponding to the screen is active. Used f
119119

120120
Title string of a tab displayed in the tab bar. When undefined, scene `title` is used. To hide, see `labeled` option in the previous section.
121121

122+
#### `tabBarBadge`
123+
124+
Badge to show on the tab icon, can be `true` to show a dot, `string` or `number` to show text.
125+
122126
#### `tabBarAccessibilityLabel`
123127

124128
Accessibility label for the tab button. This is read by the screen reader when the user taps the tab. It's recommended to set this if you don't have a label for the tab.
@@ -127,15 +131,6 @@ Accessibility label for the tab button. This is read by the screen reader when t
127131

128132
ID to locate this tab button in tests.
129133

130-
#### `tabBarOnPress`
131-
132-
Callback to handle press events; the argument is an object containing:
133-
134-
- `navigation`: navigation prop for the screen
135-
- `defaultHandler`: the default handler for tab press
136-
137-
Useful for adding a custom logic before the transition to the next scene (the tapped one) starts. When setting tabBarOnPress the defaultHandler needs to be called in order to execute the default action (i.e. switch tab).
138-
139134
### Events
140135

141136
The navigator can fire events on certain actions. Supported events are:

website/versioned_docs/version-4.x/material-bottom-tab-navigator.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ Color for the tab bar when the tab corresponding to the screen is active. Used f
8383

8484
Title string of a tab displayed in the tab bar. When undefined, scene `title` is used. To hide, see `labeled` option in the previous section.
8585

86+
#### `tabBarBadge`
87+
88+
Badge to show on the tab icon, can be `true` to show a dot, `string` or `number` to show text.
89+
8690
#### `tabBarAccessibilityLabel`
8791

8892
Accessibility label for the tab button. This is read by the screen reader when the user taps the tab. It's recommended to set this if you don't have a label for the tab.

0 commit comments

Comments
 (0)