@@ -6,6 +6,16 @@ open ReactNative
|
6 | 6 |
|
7 | 7 | type tabBarLabelPosition = [#"below-icon" | #"beside-icon"]
|
8 | 8 |
|
| 9 | +type tabBarPosition = [#bottom | #top | #left | #right] |
| 10 | + |
| 11 | +type tabBarVariant = [#uikit | #material] |
| 12 | + |
| 13 | +type animation = [ |
| 14 | +| #fade |
| 15 | +| #shift |
| 16 | +| #none |
| 17 | +] |
| 18 | + |
9 | 19 | type tabBarIconOptions = {
|
10 | 20 | focused: bool,
|
11 | 21 | color: string,
|
@@ -29,9 +39,8 @@ type rec options = {
|
29 | 39 | tabBarBadge?: string,
|
30 | 40 | tabBarBadgeStyle?: Style.t,
|
31 | 41 | tabBarAccessibilityLabel?: string,
|
32 |
| -tabBarTestID?: string, |
| 42 | +tabBarButtonTestID?: string, |
33 | 43 | tabBarButton?: unit => React.element, // TODO: props
|
34 |
| -tabBarColor?: Color.t, |
35 | 44 | tabBarActiveTintColor?: string,
|
36 | 45 | tabBarInactiveTintColor?: string,
|
37 | 46 | tabBarActiveBackgroundColor?: string,
|
@@ -40,11 +49,15 @@ type rec options = {
|
40 | 49 | tabBarItemStyle?: Style.t,
|
41 | 50 | tabBarStyle?: Style.t,
|
42 | 51 | tabBarBackground?: unit => React.element,
|
| 52 | +tabBarPosition?: tabBarPosition, |
| 53 | +tabBarVariant?: tabBarVariant, |
| 54 | +sceneStyle?: Style.t, |
43 | 55 | \"lazy"?: bool,
|
44 |
| -unmountOnBlur?: bool, |
| 56 | +popToTopOnBlur?: bool, |
45 | 57 | freezeOnBlur?: bool,
|
46 | 58 | header?: headerParams => React.element,
|
47 | 59 | headerShown?: bool,
|
| 60 | +animation?: animation, |
48 | 61 | // Header props from https://reactnavigation.org/docs/elements#header
|
49 | 62 | headerTitle?: Header.headerTitle,
|
50 | 63 | headerTitleAlign?: Header.headerTitleAlign,
|
@@ -82,8 +95,8 @@ module type NavigatorModule = {
|
82 | 95 | ~screenOptions: screenOptionsParams => options=?,
|
83 | 96 | ~backBehavior: backBehavior=?,
|
84 | 97 | ~detachInactiveScreens: bool=?,
|
85 |
| -~sceneContainerStyle: Style.t=?, |
86 | 98 | ~tabBar: unit => React.element=?,
|
| 99 | +~layout: layoutNavigatorParams => React.element=?, |
87 | 100 | ~children: React.element,
|
88 | 101 | ) => React.element
|
89 | 102 | }
|
@@ -124,8 +137,8 @@ type navigatorModule
|
124 | 137 | module Make = () => unpack(createBottomTabNavigator()->adaptNavigatorModule)
|
125 | 138 |
|
126 | 139 | module Navigation = {
|
127 |
| -@send external jumpTo: (navigation, string) => unit = "jumpTo" |
128 |
| -@send |
| 140 | +@send external jumpTo: (navigation, string, ~params: 'params=?) => unit = "jumpTo" |
| 141 | +@deprecated("Use `jumpTo` with `~params` instead") @send |
129 | 142 | external jumpToWithParams: (navigation, string, 'params) => unit = "jumpTo"
|
130 | 143 |
|
131 | 144 | @send
|
|
0 commit comments