react-native-modalbox icon indicating copy to clipboard operation
react-native-modalbox copied to clipboard

Safe view area for modal view

Open hyhypepe opened this issue 5 years ago • 3 comments

I can't wrap Modal component by SafeAreaView to handle layout properly in iOS device. Have anyone ever faced this issue? Please support me. Thank you

hyhypepe avatar Aug 05 '19 10:08 hyhypepe

+1

steveyu2 avatar Oct 08 '19 04:10 steveyu2

any news on that?

riosjr avatar Dec 27 '19 23:12 riosjr

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!

Captura de Tela 2020-01-26 às 11 42 59

lklima avatar Jan 26 '20 14:01 lklima