From 2bd76b0a0dfd5a3f5823acea7554ae746dc8e423 Mon Sep 17 00:00:00 2001 From: reck753 Date: Mon, 10 Jan 2022 17:04:35 +0100 Subject: [PATCH 1/2] Improve `Stack` by adding: - `headerBackTestID` screen option - `getId` screen prop --- src/Stack.res | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Stack.res b/src/Stack.res index 7eeda6c..7381f61 100644 --- a/src/Stack.res +++ b/src/Stack.res @@ -226,6 +226,7 @@ module Make = ( ~headerBackAllowFontScaling: bool=?, ~headerBackground: headerBackgroundOptions => React.element=?, ~headerBackImage: backImage=?, + ~headerBackTestID: string=?, ~headerBackTitle: string=?, ~headerBackTitleStyle: ReactNative.Style.t=?, ~headerBackTitleVisible: bool=?, @@ -260,6 +261,9 @@ module Make = ( } type optionsCallback = optionsProps => options + type getIdProps = {params: M.params} + type getIdCallback = getIdProps => option + type groupProps = {screenOptions: option} type navigatorProps = { @@ -273,6 +277,7 @@ module Make = ( type screenProps<'params> = { name: string, options: option, + getId: option, initialParams: option<'params>, component: option>, children: option React.element>, @@ -291,6 +296,7 @@ module Make = ( external makeProps: ( ~name: string, ~options: optionsCallback=?, + ~getId: getIdCallback=?, ~initialParams: M.params=?, ~children: renderCallbackProp => React.element, ~key: string=?, @@ -304,6 +310,7 @@ module Make = ( external makeProps: ( ~name: string, ~options: optionsCallback=?, + ~getId: getIdCallback=?, ~initialParams: M.params=?, ~component: React.component<{"navigation": navigation, "route": route}>, ~key: string=?, From 1fbc36222e524fac340b8e960ba9c7597762f1ca Mon Sep 17 00:00:00 2001 From: reck753 Date: Mon, 10 Jan 2022 17:28:52 +0100 Subject: [PATCH 2/2] Add `swipeEnabled` option to `MaterialTopTabs` --- src/MaterialTopTabs.res | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MaterialTopTabs.res b/src/MaterialTopTabs.res index f9996ca..e75caf6 100644 --- a/src/MaterialTopTabs.res +++ b/src/MaterialTopTabs.res @@ -112,6 +112,7 @@ module Make = ( ~tabBarTestID: string=?, ~_lazy: bool=?, ~lazyPlaceholder: React.component<{"route": route}>=?, + ~swipeEnabled: bool=?, ~tabBarActiveTintColor: string=?, ~tabBarInactiveTintColor: string=?, ~tabBarPressColor: string=?, @@ -224,6 +225,8 @@ module Make = ( | @as("on-drag") #onDrag | #none ]=?, + // Setting `swipeEnabled` through props is deprecated. + // Set it through screen options instead! ~swipeEnabled: bool=?, ~swipeVelocityImpact: float=?, ~sceneContainerStyle: ReactNative.Style.t=?,