refactor(dialog/DialogContent): move variants from DialogOverlay to base

This commit is contained in:
p-sw 2024-07-12 18:28:33 +09:00
parent 13f1d9def3
commit 61a263addb

View File

@ -60,33 +60,15 @@ const DialogTrigger = ({ children }: DialogTriggerProps) => {
*/ */
const [dialogOverlayVariant, resolveDialogOverlayVariant] = vcn({ const [dialogOverlayVariant, resolveDialogOverlayVariant] = vcn({
base: "fixed inset-0 z-50 w-full h-screen overflow-y-auto max-w-screen transition-all duration-300", base: "fixed inset-0 z-50 w-full h-screen overflow-y-auto max-w-screen transition-all duration-300 backdrop-blur-md backdrop-brightness-75 [&>div]:p-6",
variants: { variants: {
opened: { opened: {
true: "pointer-events-auto opacity-100", true: "pointer-events-auto opacity-100",
false: "pointer-events-none opacity-0", false: "pointer-events-none opacity-0",
}, },
blur: {
sm: "backdrop-blur-sm",
md: "backdrop-blur-md",
lg: "backdrop-blur-lg",
},
darken: {
sm: "backdrop-brightness-90",
md: "backdrop-brightness-75",
lg: "backdrop-brightness-50",
},
padding: {
sm: "[&>div]:p-4",
md: "[&>div]:p-6",
lg: "[&>div]:p-8",
},
}, },
defaults: { defaults: {
opened: false, opened: false,
blur: "md",
darken: "md",
padding: "md",
}, },
}); });