refactor(dialog): move default variants to base

This commit is contained in:
p-sw 2024-07-12 18:35:14 +09:00
parent c08a81badd
commit b56242c497

View File

@ -196,17 +196,9 @@ const DialogClose = ({ children }: DialogCloseProps) => {
*/ */
const [dialogHeaderVariant, resolveDialogHeaderVariant] = vcn({ const [dialogHeaderVariant, resolveDialogHeaderVariant] = vcn({
base: "flex flex-col", base: "flex flex-col gap-2",
variants: { variants: {},
gap: { defaults: {},
sm: "gap-2",
md: "gap-4",
lg: "gap-6",
},
},
defaults: {
gap: "sm",
},
}); });
interface DialogHeaderProps interface DialogHeaderProps
@ -239,22 +231,9 @@ DialogHeader.displayName = "DialogHeader";
*/ */
const [dialogTitleVariant, resolveDialogTitleVariant] = vcn({ const [dialogTitleVariant, resolveDialogTitleVariant] = vcn({
variants: { base: "text-xl font-bold",
size: { variants: {},
sm: "text-lg", defaults: {},
md: "text-xl",
lg: "text-2xl",
},
weight: {
sm: "font-medium",
md: "font-semibold",
lg: "font-bold",
},
},
defaults: {
size: "md",
weight: "lg",
},
}); });
interface DialogTitleProps interface DialogTitleProps
@ -262,28 +241,9 @@ interface DialogTitleProps
VariantProps<typeof dialogTitleVariant> {} VariantProps<typeof dialogTitleVariant> {}
const [dialogSubtitleVariant, resolveDialogSubtitleVariant] = vcn({ const [dialogSubtitleVariant, resolveDialogSubtitleVariant] = vcn({
variants: { base: "text-sm opacity-60 font-normal",
size: { variants: {},
sm: "text-sm", defaults: {},
md: "text-base",
lg: "text-lg",
},
opacity: {
sm: "opacity-60",
md: "opacity-70",
lg: "opacity-80",
},
weight: {
sm: "font-light",
md: "font-normal",
lg: "font-medium",
},
},
defaults: {
size: "sm",
opacity: "sm",
weight: "md",
},
}); });
interface DialogSubtitleProps interface DialogSubtitleProps