add: menu filter modal

This commit is contained in:
Mahyar Khanbolooki
2025-07-09 00:34:17 +03:30
parent 82cdaffe6d
commit 7207e92e38
4 changed files with 88 additions and 7 deletions
@@ -7,7 +7,7 @@ type Props = {
bgOpacity?: string
changeDelay?: string
effectdelay?: string
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLButtonElement>, HTMLButtonElement>
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
const BlurredOverlayContainer = ({
visible = true,
@@ -15,6 +15,7 @@ const BlurredOverlayContainer = ({
changeDelay = '0',
effectdelay = '0',
children,
onClick,
...props
}: Props) => {
const [loaded, setLoaded] = useState(visible)
@@ -35,11 +36,11 @@ const BlurredOverlayContainer = ({
visible || loaded ? 'z-50' : !visible && !loaded ? '-z-50' : 'z-0'
return (
<button
<div
data-visible={visible}
data-loaded={loaded}
className={props.className + `
absolute inset-0 flex items-center justify-center h-dvh w-full
fixed inset-0 flex items-center justify-center h-dvh w-full
backdrop-blur-sm
opacity-0 transition-opacity duration-300 ease-in-out delay-${effectdelay}
${zClass}
@@ -47,8 +48,9 @@ const BlurredOverlayContainer = ({
style={{ backgroundColor: `rgba(0, 0, 0, ${+bgOpacity / 100})` }}
{...props}
>
<div className='w-full h-dvh overflow-hidden' onClick={onClick}></div>
{children}
</button>
</div>
)
}