Skip to content

Commit 0759817

Browse files
committed
fix: bottom sheet modal improvements
1 parent c17e542 commit 0759817

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

package/src/components/UIComponents/BottomSheetModal.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
KeyboardEvent,
66
Modal,
77
StyleSheet,
8+
TouchableWithoutFeedback,
89
useWindowDimensions,
910
View,
1011
} from 'react-native';
@@ -119,23 +120,25 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
119120
return (
120121
<Modal animationType='fade' onRequestClose={handleDismiss} transparent visible={visible}>
121122
<GestureHandlerRootView style={{ flex: 1 }}>
122-
<View style={[styles.overlay, { backgroundColor: overlay }]}>
123-
<GestureDetector gesture={gesture}>
124-
<Animated.View
125-
style={[
126-
styles.container,
127-
{
128-
backgroundColor: white_snow,
129-
height,
130-
transform: [{ translateY }],
131-
},
132-
]}
133-
>
134-
<View style={[styles.handle, { backgroundColor: grey, width: windowWidth / 4 }]} />
135-
<View style={styles.contentContainer}>{children}</View>
136-
</Animated.View>
137-
</GestureDetector>
138-
</View>
123+
<TouchableWithoutFeedback onPress={handleDismiss}>
124+
<View style={[styles.overlay, { backgroundColor: overlay }]}>
125+
<GestureDetector gesture={gesture}>
126+
<Animated.View
127+
style={[
128+
styles.container,
129+
{
130+
backgroundColor: white_snow,
131+
height,
132+
transform: [{ translateY }],
133+
},
134+
]}
135+
>
136+
<View style={[styles.handle, { backgroundColor: grey, width: windowWidth / 4 }]} />
137+
<View style={styles.contentContainer}>{children}</View>
138+
</Animated.View>
139+
</GestureDetector>
140+
</View>
141+
</TouchableWithoutFeedback>
139142
</GestureHandlerRootView>
140143
</Modal>
141144
);

0 commit comments

Comments
 (0)