|
1 | 1 | import { StyleProp, ViewStyle } from 'react-native'; |
| 2 | +import { BottomNavigation } from 'react-native-paper'; |
2 | 3 | import { |
3 | 4 | NavigationRoute, |
4 | 5 | NavigationState, |
@@ -38,45 +39,28 @@ export type NavigationMaterialBottomTabOptions = { |
38 | 39 | }) => void; |
39 | 40 | }; |
40 | 41 |
|
41 | | -export type NavigationMaterialBottomTabConfig = { |
42 | | - /** |
43 | | - * Whether the shifting style is used, the active tab appears wider and the inactive tabs won't have a label. |
44 | | - * By default, this is `true` when you have more than 3 tabs. |
45 | | - */ |
46 | | - shifting?: boolean; |
47 | | - /** |
48 | | - * Whether to show labels in tabs. When `false`, only icons will be displayed. |
49 | | - */ |
50 | | - labeled?: boolean; |
51 | | - /** |
52 | | - * Custom color for icon and label in the active tab. |
53 | | - */ |
54 | | - activeColor?: string; |
| 42 | +export type NavigationMaterialBottomTabConfig = Partial< |
| 43 | + Omit< |
| 44 | + React.ComponentProps<typeof BottomNavigation>, |
| 45 | + | 'navigationState' |
| 46 | + | 'onIndexChange' |
| 47 | + | 'onTabPress' |
| 48 | + | 'renderScene' |
| 49 | + | 'renderLabel' |
| 50 | + | 'renderIcon' |
| 51 | + | 'getAccessibilityLabel' |
| 52 | + | 'getBadge' |
| 53 | + | 'getColor' |
| 54 | + | 'getLabelText' |
| 55 | + | 'getTestID' |
| 56 | + > |
| 57 | +> & { |
55 | 58 | activeColorLight?: string; |
56 | 59 | activeColorDark?: string; |
57 | | - /** |
58 | | - * Custom color for icon and label in the inactive tab. |
59 | | - */ |
60 | | - inactiveColor?: string; |
61 | 60 | inactiveColorLight?: string; |
62 | 61 | inactiveColorDark?: string; |
63 | | - /** |
64 | | - * Whether the bottom navigation bar is hidden when keyboard is shown. |
65 | | - * On Android, this works best when [`windowSoftInputMode`](https://developer.android.com/guide/topics/manifest/activity-element#wsoft) is set to `adjustResize`. |
66 | | - */ |
67 | | - keyboardHidesNavigationBar?: boolean; |
68 | | - /** |
69 | | - * Style for the bottom navigation bar. |
70 | | - * You can set a bottom padding here if you have a translucent navigation bar on Android: |
71 | | - * |
72 | | - * ```js |
73 | | - * barStyle={{ paddingBottom: 48 }} |
74 | | - * ``` |
75 | | - */ |
76 | | - barStyle?: StyleProp<ViewStyle>; |
77 | 62 | barStyleLight?: StyleProp<ViewStyle>; |
78 | 63 | barStyleDark?: StyleProp<ViewStyle>; |
79 | | - style?: StyleProp<ViewStyle>; |
80 | 64 | }; |
81 | 65 |
|
82 | 66 | export type NavigationTabScreenProps< |
|
0 commit comments