Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/RNNBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Navigation,
Layout,
OptionsModalPresentationStyle,
Options,
} from 'react-native-navigation';

import { listen, dispatch } from './events';
Expand All @@ -14,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;
Expand Down Expand Up @@ -55,7 +58,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;
Expand Down Expand Up @@ -94,7 +97,8 @@ export default class RNNBottomSheet {
popGesture: false,
modalPresentationStyle:
'overCurrentContext' as OptionsModalPresentationStyle,
},
...options
},
},
};
Navigation.showModal(layout);
Expand Down