@@ -45,7 +45,7 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
4545 const { children, height = windowHeight / 2 , onClose, visible } = props ;
4646 const {
4747 theme : {
48- bottomSheetModal : { container, contentContainer, handle, overlay : overlayTheme } ,
48+ bottomSheetModal : { container, contentContainer, handle, overlay : overlayTheme , wrapper } ,
4949 colors : { grey, overlay, white_snow } ,
5050 } ,
5151 } = useTheme ( ) ;
@@ -119,11 +119,14 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
119119 } ) ;
120120
121121 return (
122- < GestureHandlerRootView style = { { flex : 1 } } >
123- < Modal animationType = 'fade' onRequestClose = { handleDismiss } transparent visible = { visible } >
124- < TouchableWithoutFeedback onPress = { handleDismiss } >
125- < View style = { [ styles . overlay , { backgroundColor : overlay } , overlayTheme ] } >
126- < GestureDetector gesture = { gesture } >
122+ < View style = { [ styles . wrapper , wrapper ] } >
123+ < Modal onRequestClose = { onClose } transparent visible = { visible } >
124+ < GestureHandlerRootView style = { { flex : 1 } } >
125+ < GestureDetector gesture = { gesture } >
126+ < View style = { [ styles . overlay , { backgroundColor : overlay } , overlayTheme ] } >
127+ < TouchableWithoutFeedback onPress = { onClose } style = { { flex : 1 } } >
128+ < View style = { { flex : 1 } } />
129+ </ TouchableWithoutFeedback >
127130 < Animated . View
128131 style = { [
129132 styles . container ,
@@ -140,11 +143,11 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
140143 />
141144 < View style = { [ styles . contentContainer , contentContainer ] } > { children } </ View >
142145 </ Animated . View >
143- </ GestureDetector >
144- </ View >
145- </ TouchableWithoutFeedback >
146+ </ View >
147+ </ GestureDetector >
148+ </ GestureHandlerRootView >
146149 </ Modal >
147- </ GestureHandlerRootView >
150+ </ View >
148151 ) ;
149152} ;
150153
@@ -171,4 +174,9 @@ const styles = StyleSheet.create({
171174 flex : 1 ,
172175 justifyContent : 'flex-end' ,
173176 } ,
177+ wrapper : {
178+ alignItems : 'center' ,
179+ flex : 1 ,
180+ justifyContent : 'center' ,
181+ } ,
174182} ) ;
0 commit comments