Skip to content

Commit

Permalink
docs: updated the modal usage example (#1991)(by @vins13pattar)
Browse files Browse the repository at this point in the history
BottomSheetModalProvider is wrapped within the GestureHandlerRootView
  • Loading branch information
vins13pattar authored Oct 26, 2024
1 parent 9757bd2 commit 3541b00
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions website/docs/modal/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ const App = () => {

// renders
return (
<BottomSheetModalProvider>
<GestureHandlerRootView style={styles.container}>
<Button
onPress={handlePresentModalPress}
title="Present Modal"
color="black"
/>
<BottomSheetModal
ref={bottomSheetModalRef}
onChange={handleSheetChanges}
>
<BottomSheetView style={styles.contentContainer}>
<Text>Awesome 🎉</Text>
</BottomSheetView>
<BottomSheetModalProvider>
<Button
onPress={handlePresentModalPress}
title="Present Modal"
color="black"
/>
<BottomSheetModal
ref={bottomSheetModalRef}
onChange={handleSheetChanges}
>
<BottomSheetView style={styles.contentContainer}>
<Text>Awesome 🎉</Text>
</BottomSheetView>
</BottomSheetModal>
</GestureHandlerRootView>
</BottomSheetModalProvider>
</BottomSheetModalProvider>
</GestureHandlerRootView>
);
};

Expand Down

0 comments on commit 3541b00

Please sign in to comment.