Skip to content

Commit

Permalink
docs: add annotation for bottom navigation tab bar color prop (callst…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak authored Oct 14, 2023
1 parent 557ba69 commit b330185
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs/guides/09-bottom-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Generic title that can be used as a fallback for `headerTitle` and `tabBarLabel`

Function that given `{ focused: boolean, color: string }` returns a React.Node, to display in the tab bar.

#### `tabBarColor`
#### `tabBarColor` <div class="badge badge-deprecated">In v5.x works only with theme version 2.</div>

Color for the tab bar when the tab corresponding to the screen is active. Used for the ripple effect. This is only supported when `shifting` is `true`.

Expand Down
2 changes: 1 addition & 1 deletion src/components/BottomNavigation/BottomNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export type Props<Route extends BaseRoute> = {
* - `title`: title of the route to use as the tab label
* - `focusedIcon`: icon to use as the focused tab icon, can be a string, an image source or a react component @renamed Renamed from 'icon' to 'focusedIcon' in v5.x
* - `unfocusedIcon`: icon to use as the unfocused tab icon, can be a string, an image source or a react component @supported Available in v5.x with theme version 3
* - `color`: color to use as background color for shifting bottom navigation @deprecated Deprecated in v5.x
* - `color`: color to use as background color for shifting bottom navigation @deprecated In v5.x works only with theme version 2.
* - `badge`: badge to show on the tab icon, can be `true` to show a dot, `string` or `number` to show text.
* - `accessibilityLabel`: accessibility label for the tab button
* - `testID`: test id for the tab button
Expand Down
1 change: 1 addition & 0 deletions src/react-navigation/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export type MaterialBottomTabNavigationOptions = {
title?: string;

/**
* @deprecated In v5.x works only with theme version 2.
* Color of the tab bar when this tab is active. Only used when `shifting` is `true`.
*/
tabBarColor?: string;
Expand Down

0 comments on commit b330185

Please sign in to comment.