Skip to content

Commit 5f667e7

Browse files
committed
docs: correct example code
1 parent 1c30ad8 commit 5f667e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/BottomNavigation/BottomNavigationBar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ const Touchable = <Route extends BaseRoute>({
268268
* tabBar={({ navigation, state, descriptors, insets }) => (
269269
* <BottomNavigation.Bar
270270
* navigationState={state}
271-
* safeAreaInsets={insets}
271+
* safeAreaInsets={insets}
272272
* onTabPress={({ route, preventDefault }) => {
273273
* const event = navigation.emit({
274274
* type: 'tabPress',
@@ -296,11 +296,11 @@ const Touchable = <Route extends BaseRoute>({
296296
* getLabelText={({ route }) => {
297297
* const { options } = descriptors[route.key];
298298
* const label =
299-
* options.tabBarLabel !== undefined
299+
* typeof options.tabBarLabel === 'string'
300300
* ? options.tabBarLabel
301-
* : options.title !== undefined
301+
* : typeof options.title === 'string'
302302
* ? options.title
303-
* : route.title;
303+
* : route.name;
304304
*
305305
* return label;
306306
* }}

0 commit comments

Comments
 (0)