Open justkd opened 3 years ago
Ok that's odd. 😳
I reproduced the issue and I fixed the orientation by adding supportedOrientations={["portrait", "landscape"]}
to the Modal
.
Unluckily that's not enough to add landscape support, but I will look into it tomorrow.
Released to v3.1.0, let me know if it works for you
EDIT: I saw the native actionsheet on iOS takes less than half of the screen size on landscape mode, should I do the same?
@alessiocancian I had to go in and add the other landscape orientations in order for this to work, but otherwise it's looking great!
supportedOrientations={["portrait", "landscape", "landscape-left", "landscape-right"]}
Do you know if Android trims it down in the default version? Personally, I do like the trimmed down version for landscape. When it's full width it's a lot of whitespace in most cases.
@alessiocancian I had to go in and add the other landscape orientations in order for this to work, but otherwise it's looking great!
supportedOrientations={["portrait", "landscape", "landscape-left", "landscape-right"]}
Ok I'll make this the default value and add an optional prop to change supportedOrientations if needed.
Do you know if Android trims it down in the default version? Personally, I do like the trimmed down version for landscape. When it's full width it's a lot of whitespace in most cases.
There isn't a real equivalent of ActionSheet for Android, there is a material version here but I don't like it.
I think I will implement the "trimmed" version only for iOS style ActionSheets, so on Android only if theme="ios"
.
Bug
When in landscape orientation, when ActionSheetCustom is opened, it forces portrait mode while the action sheet is open. Once closed, it reverts to the original orientation.
Environment info
Steps To Reproduce
Describe what you expected to happen: