Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions libs/ui/lib/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function Modal({ children, onDismiss, title, isOpen }: ModalProps) {
>
<Dialog.Portal>
<div
className="DialogOverlay pointer-events-auto"
className="DialogOverlay pointer-events-auto relative"
onClick={onDismiss}
aria-hidden
/>
Expand All @@ -75,6 +75,12 @@ export function Modal({ children, onDismiss, title, isOpen }: ModalProps) {
</Dialog.Title>
)}
{children}
<Dialog.Close
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to add a comment for context like the side modal — in case this component is recreated and we hit the same issue again.

className="absolute right-2 top-3 flex rounded p-2 hover:bg-hover"
aria-label="Close"
>
<Close12Icon className="text-secondary" />
</Dialog.Close>
</AnimatedDialogContent>
</Dialog.Portal>
</Dialog.Root>
Expand All @@ -99,9 +105,6 @@ const ModalTitle = forwardRef<HTMLDivElement, ModalTitleProps>(({ children, id }
<h2 className="text-sans-semi-lg" id={id}>
{children}
</h2>
<Dialog.Close className="-m-2 flex rounded p-2 hover:bg-hover" aria-label="Close">
<Close12Icon className="text-secondary" />
</Dialog.Close>
</div>
))

Expand Down