Skip to content

Commit

Permalink
feat(luna): implemented close dialog when clicking outside (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
neuodev authored Jan 29, 2025
2 parents 7252001 + ecf71d9 commit 66849eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/luna/src/components/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export const Dialog: React.FC<{
<Root open={open} onOpenChange={setOpen}>
{trigger ? <Trigger>{trigger}</Trigger> : null}
<Portal>
<Overlay className="tw-fixed tw-inset-0 tw-backdrop-blur-[15px] tw-bg-overlay-dialog tw-z-10" />
<Overlay
onClick={close}
className="tw-fixed tw-inset-0 tw-backdrop-blur-[15px] tw-bg-overlay-dialog tw-z-10"
/>
<Content
aria-describedby={description}
dir="rtl"
Expand Down

0 comments on commit 66849eb

Please sign in to comment.