emilkowalski / vaul

An unstyled drawer component for React.
https://vaul.emilkowal.ski
MIT License
5.27k stars 170 forks source link

[Feat]: Intoduce Prop To Disable Drag feature Globally In Drawer #312

Closed DevYemi closed 3 months ago

DevYemi commented 3 months ago

Hi there, thanks for this wonderful project.

I am coming from shadcn-ui library where this package is being used internally. I want to be able to disable the close-on-drag feature globally and not as data-vaul-no-drag passed to each element.

The problem with the current data-vaul-no-drag solution is that I have to pass it to every element in the drawer which is not ideal.

Ps: i would gladly work

joaom00 commented 3 months ago

Wouldn't that be the dismissible prop you're looking for? https://codesandbox.io/p/sandbox/drawer-without-scale-forked-kxh9j5?file=%2Fapp%2Fmy-drawer.tsx%3A1%2C1

DevYemi commented 3 months ago

@joaom00 Yeah it is, thank you very much, probably missed it cause it isn't well documented.

Will be closing this