Open tibbe opened 1 year ago
I think I figured it out. The snapPoints
are relative to the height
passed to the containerStyle
. In fact it's really important to set the height
for things in general to work in a sensible manner. It would be nice if the docs mention this.
This caught me out too. It's not clear in the docs at all. Thanks @tibbe
If I set
snapPoints={[55, 100]}
I'd expect that the card would cover 55% or 100% of the viewport but that doesn't seem to be the case at all. The size of the card seems to be whatever fits the contents and if the contents is smaller than 55% of the screen then I can't pull the card up to cover 55%/100%. I can pull it up some small, "random" amount. Standalone sample app using 0.71.7:App.tsx:
Initial size:![Simulator Screenshot - iPhone 14 - 2023-07-17 at 13 39 36](https://github.com/ammarahm-ed/react-native-actions-sheet/assets/17277/ff323a7a-e730-4fcd-aaa0-5e090826c407)
Fully pulled up size:![Simulator Screenshot - iPhone 14 - 2023-07-17 at 13 39 44](https://github.com/ammarahm-ed/react-native-actions-sheet/assets/17277/e22b8571-cd79-4afe-a2fa-76fa202d05e0)