react-native-modalbox
react-native-modalbox copied to clipboard
SafeAreaView with coverscreen
When coverscreen prop is specified, SafeAreaView inside the modal does not work.
<Modal
onClosed={onClosed}
isOpen={true}
position="bottom"
coverScreen={true}
style={{ height: 500 }}
>
<SafeAreaView style={composeStyles("occupy")}>
...Other code...
</SafeAreaView>
</Modal>

I have the same problem, and If you don't set the height of Modal, SafeAreaView will work.After setting the height of Modal, SafeAreaView is invalid. @maxs15
I fixed this issue with https://github.com/miyabi/react-native-safe-area library, setting bottom on modal style:
`SafeArea.getSafeAreaInsetsForRootView().then((result) => {
const bottom = Platform.OS === 'ios' ? result.safeAreaInsets.bottom : 0;
this.setState({ bottom });
});`
and:
`<Modal
style={[styles.modalContainer, { bottom }]}
isOpen={isOpen}
position="bottom"
backButtonClose={false}
backdrop={false}
swipeToClose={false}
>
<Text style={styles.modalText}>
{sdText}, {userName}
</Text>`
Hope this helps!