Files
web/components/TempDesignSystem/Alert/variants.ts
2024-10-22 11:41:32 +02:00

24 lines
522 B
TypeScript

import { cva } from "class-variance-authority"
import styles from "./alert.module.css"
import { AlertTypeEnum } from "@/types/enums/alert"
export const alertVariants = cva(styles.alert, {
variants: {
variant: {
inline: styles.inline,
banner: styles.banner,
},
type: {
[AlertTypeEnum.Info]: styles.info,
[AlertTypeEnum.Warning]: styles.warning,
[AlertTypeEnum.Alarm]: styles.alarm,
},
},
defaultVariants: {
variant: "inline",
type: AlertTypeEnum.Info,
},
})