From bdf546e887f3addaef92c8b4bffba9ec90bee296 Mon Sep 17 00:00:00 2001 From: docvhcmc Date: Sun, 26 Feb 2023 16:47:45 +0700 Subject: [PATCH 1/3] Update RNNBottomSheet.tsx --- src/RNNBottomSheet.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/RNNBottomSheet.tsx b/src/RNNBottomSheet.tsx index 1ea95c8..4b74ed0 100644 --- a/src/RNNBottomSheet.tsx +++ b/src/RNNBottomSheet.tsx @@ -2,6 +2,7 @@ import { Navigation, Layout, OptionsModalPresentationStyle, + Options, } from 'react-native-navigation'; import { listen, dispatch } from './events'; @@ -55,7 +56,7 @@ export default class RNNBottomSheet { dispatch('BOTTOM_SHEET_SNAP_TO', index); } - static openBottomSheet(props: RNNBottomSheetProps) { + static openBottomSheet(props: RNNBottomSheetProps, options?: Options) { if (!this.registered) { console.error(notInitialized); return; @@ -95,6 +96,7 @@ export default class RNNBottomSheet { modalPresentationStyle: 'overCurrentContext' as OptionsModalPresentationStyle, }, + ...options }, }; Navigation.showModal(layout); From c7eaacb9778c3683fc2d5d21f961fdfb6095f50b Mon Sep 17 00:00:00 2001 From: docvhcmc Date: Sun, 26 Feb 2023 17:00:46 +0700 Subject: [PATCH 2/3] Update RNNBottomSheet.tsx --- src/RNNBottomSheet.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/RNNBottomSheet.tsx b/src/RNNBottomSheet.tsx index 4b74ed0..331570a 100644 --- a/src/RNNBottomSheet.tsx +++ b/src/RNNBottomSheet.tsx @@ -15,6 +15,8 @@ const notInitialized = 'You have not initialized RNNBottomSheet component.'; const openedInstance = 'You already have running instance of the component. Aborting...'; +export type { RNNBottomSheetProps } + export default class RNNBottomSheet { private static modalOpened = false; private static registered = false; From e924ce0ea0de502f48da4288dfa84cf558c22901 Mon Sep 17 00:00:00 2001 From: docvhcmc Date: Sun, 26 Feb 2023 17:22:27 +0700 Subject: [PATCH 3/3] Update RNNBottomSheet.tsx --- src/RNNBottomSheet.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RNNBottomSheet.tsx b/src/RNNBottomSheet.tsx index 331570a..25445ed 100644 --- a/src/RNNBottomSheet.tsx +++ b/src/RNNBottomSheet.tsx @@ -97,8 +97,8 @@ export default class RNNBottomSheet { popGesture: false, modalPresentationStyle: 'overCurrentContext' as OptionsModalPresentationStyle, - }, - ...options + ...options + }, }, }; Navigation.showModal(layout);