GSTJ / react-native-magic-modal

🦄 A modal library that can be called imperatively from anywhere!
https://github.com/GSTJ/react-native-magic-modal
MIT License
186 stars 8 forks source link

Backdrop fills on half in landscape orientation #27

Closed xdarkleonx closed 3 months ago

xdarkleonx commented 1 year ago

In portrait orientation backdrop covers all width and works fine, but when you change to landscape backdrop is covering half.

Screenshot_16940

modalConfig = {
  animationIn: 'fadeIn',
  animationOut: 'fadeOut',
  coverScreen: false,
  swipeDirection: null,
}

magicModal.show(
  <ActionMenu
     style={mainLayout.modal}
     label={t('diaryMenu')}
     items={actions}
     dayItems={fastInsertItems}
      onValueChange={() => magicModal.hide()}
  />
  , modalConfig
)

I found workaround and add deviceWidth to modalConfig. But i think it should be work without setting manually width to modal.

GSTJ commented 3 months ago

Fixed!