From 3e81fead7a87aa059f61cd754c48617541f923d8 Mon Sep 17 00:00:00 2001 From: Jan Librowski Date: Tue, 15 Jul 2025 16:56:50 +0200 Subject: [PATCH 1/2] Fix modal backdrop --- .../ui/src/components/modal/modal.module.css | 2 +- packages/ui/src/components/modal/modal.tsx | 31 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/ui/src/components/modal/modal.module.css b/packages/ui/src/components/modal/modal.module.css index d1bb15bd..6c313ebe 100644 --- a/packages/ui/src/components/modal/modal.module.css +++ b/packages/ui/src/components/modal/modal.module.css @@ -74,7 +74,7 @@ left: 0; width: 100%; height: 100%; - z-index: 1; + z-index: 0; inset: 0; background-color: color-mix( in srgb, diff --git a/packages/ui/src/components/modal/modal.tsx b/packages/ui/src/components/modal/modal.tsx index b3e01f31..e1d679b7 100644 --- a/packages/ui/src/components/modal/modal.tsx +++ b/packages/ui/src/components/modal/modal.tsx @@ -67,7 +67,7 @@ export const Modal = forwardRef( open={open} onClose={onClose} slots={{ - backdrop: (props) => , + backdrop: Backdrop, }} > @@ -112,23 +112,26 @@ export const Modal = forwardRef( /** * Backdrop component for the modal that dims the background */ -const Backdrop = forwardRef< - HTMLDivElement, - { open?: boolean; className: string; onClose?: () => void } ->((props, ref) => { - const { open, className, onClose } = props; +const Backdrop = forwardRef((props, ref) => { + const { open, className } = props; return ( -
- {onClose && ( -