Open merlinstardust opened 3 months ago
I've created a minimal recreation and added it to Code Sandbox. The issue is somehow caused by my use of an index file to export all my shadcn components from. If I remove export {default as Sheet} from './Sheet';
from atoms/index.ts or if I import Dialog directly with import Dialog from ~/atoms/Dialog
, things work as expected.
Describe the bug
I copied the code from the shadcn site for Dialog and used it in my app. But when I click the trigger, a drawer opens instead. If I update the modal dialog code, the drawer then turns into a regular Dialog. If I refresh the screen, the updates disappear and it's a drawer again.
https://github.com/shadcn-ui/ui/assets/421960/1bae5e79-46de-424c-b867-e3184be9f9ca
Affected component/components
Dialog
How to reproduce
GitHub Repo
https://github.com/merlinstardust/example-shadcn-dialog-issue
Codesandbox/StackBlitz link
https://codesandbox.io/p/github/merlinstardust/example-shadcn-dialog-issue/
Logs
No response
System Info
Before submitting