diff --git a/src/ModalView.tsx b/src/ModalView.tsx index f7ebe92..bdac54b 100644 --- a/src/ModalView.tsx +++ b/src/ModalView.tsx @@ -24,6 +24,7 @@ export const ModalView: FC = ({ onRequestDismiss, contentContainerStyle, statusBar, + showBackdrop = true, BackdropPressableComponent = Pressable, backdropColor = defaultBackdropColor, disableDefaultStatusBarIOS = false, @@ -44,22 +45,24 @@ export const ModalView: FC = ({ ) : null} - - onRequestDismiss?.(DismissalSource.Backdrop)} - > - {renderBackdrop ? ( - renderBackdrop() - ) : ( - - )} - - + {showBackdrop && ( + + onRequestDismiss?.(DismissalSource.Backdrop)} + > + {renderBackdrop ? ( + renderBackdrop() + ) : ( + + )} + + + )} = ({ renderBackdrop, onRequestDismiss, contentContainerStyle, + showBackdrop = true, BackdropPressableComponent = Pressable, backdropColor = defaultBackdropColor, animationType = 'none', @@ -57,22 +58,24 @@ export const ModalView: FC = ({ }, [animationType, modalIsOpen]); return createPortal( - - onRequestDismiss?.(DismissalSource.Backdrop)} - > - {renderBackdrop ? ( - renderBackdrop() - ) : ( - - )} - + + {showBackdrop && ( + onRequestDismiss?.(DismissalSource.Backdrop)} + > + {renderBackdrop ? ( + renderBackdrop() + ) : ( + + )} + + )}