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
783 stars 74 forks source link

Fix for disableDrag not working on Sheet Content and Sheet Header #100

Closed elsonel closed 1 year ago

elsonel commented 1 year ago

This PR is in response to the issues I encountered in https://github.com/Temzasse/react-modal-sheet/issues/98.

Sheet.Content and Sheet.Header have the disableDrag prop, but passing this prop does absolutely nothing. The expected behavior is that the dragProps prop responsible for drag behavior should be set to undefined when disableDrag is passed in.

Currently this behavior is only implemented for the parent Sheet component. This PR implements this behavior for Sheet.Content and Sheet.Header as well.