Temzasse / react-modal-sheet

Flexible bottom sheet component built with Framer Motion to provide buttery smooth UX while keeping accessibility in mind 🪐
https://temzasse.github.io/react-modal-sheet/
MIT License
815 stars 77 forks source link

Request: Flag to make whole sheet draggable/only header #10

Closed marcinbittel closed 3 years ago

marcinbittel commented 3 years ago

Hey,

As I can see in commits history that the SheetContent was not a draggable component in the past, is there a chance to provide functionality to disable drag on SheetContent eg. by adding some component props?

Temzasse commented 3 years ago

This should be quite easy to add but I have to think about what the API will be for these kinds of modifiers.

This somewhat relates to the other issue about disabling the closing of the sheet. Maybe both of these could be solved by a unified solution 🤔

Temzasse commented 3 years ago

I added disabledDrag prop that can be used to disable dragging for the whole sheet or its subparts.

Please take a look at the Sheet.Content props section in the docs.

I hope this solves your issue 🙂

Temzasse commented 3 years ago

Oh yeah and remember to update the lib to v1.3.0.

marcinbittel commented 3 years ago

Thank you for the quick reply! :)