Skip to content

Commit

Permalink
fix overlay (#4190)
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda authored Nov 25, 2024
1 parent ab45678 commit 1a54b01
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apps/ui-kit/src/lib/components/organisms/dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ const DialogOverlay = React.forwardRef<
React.ElementRef<typeof RadixDialog.Overlay>,
React.ComponentPropsWithoutRef<typeof RadixDialog.Overlay> & {
showCloseIcon?: boolean;
position?: DialogPosition;
}
>(({ showCloseIcon, ...props }, ref) => (
>(({ showCloseIcon, position, ...props }, ref) => (
<RadixDialog.Overlay
ref={ref}
className="fixed inset-0 z-[99998] bg-shader-neutral-light-48 backdrop-blur-md"
className={cx('inset-0 z-[99998] bg-shader-neutral-light-48 backdrop-blur-md', {
fixed: position === DialogPosition.Right,
absolute: position === DialogPosition.Center,
})}
{...props}
>
<DialogClose className={cx('fixed right-3 top-3', { hidden: !showCloseIcon })}>
Expand Down Expand Up @@ -66,7 +70,7 @@ const DialogContent = React.forwardRef<
: 'max-h-[60vh] left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-xl w-80 max-w-[85vw]';
return (
<RadixDialog.Portal container={containerElement}>
<DialogOverlay showCloseIcon={showCloseOnOverlay} />
<DialogOverlay showCloseIcon={showCloseOnOverlay} position={position} />
<RadixDialog.Content
ref={ref}
className={cx(
Expand Down

0 comments on commit 1a54b01

Please sign in to comment.