Skip to content

Commit 3541b00

Browse files
authored
docs: updated the modal usage example (#1991)(by @vins13pattar)
BottomSheetModalProvider is wrapped within the GestureHandlerRootView
1 parent 9757bd2 commit 3541b00

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

website/docs/modal/usage.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ const App = () => {
3232

3333
// renders
3434
return (
35-
<BottomSheetModalProvider>
3635
<GestureHandlerRootView style={styles.container}>
37-
<Button
38-
onPress={handlePresentModalPress}
39-
title="Present Modal"
40-
color="black"
41-
/>
42-
<BottomSheetModal
43-
ref={bottomSheetModalRef}
44-
onChange={handleSheetChanges}
45-
>
46-
<BottomSheetView style={styles.contentContainer}>
47-
<Text>Awesome 🎉</Text>
48-
</BottomSheetView>
36+
<BottomSheetModalProvider>
37+
<Button
38+
onPress={handlePresentModalPress}
39+
title="Present Modal"
40+
color="black"
41+
/>
42+
<BottomSheetModal
43+
ref={bottomSheetModalRef}
44+
onChange={handleSheetChanges}
45+
>
46+
<BottomSheetView style={styles.contentContainer}>
47+
<Text>Awesome 🎉</Text>
48+
</BottomSheetView>
4949
</BottomSheetModal>
50-
</GestureHandlerRootView>
51-
</BottomSheetModalProvider>
50+
</BottomSheetModalProvider>
51+
</GestureHandlerRootView>
5252
);
5353
};
5454

0 commit comments

Comments
 (0)