Files
web/components/TempDesignSystem/Text/Caption/variants.ts
2024-10-02 11:50:56 +02:00

52 lines
1.1 KiB
TypeScript

import { cva } from "class-variance-authority"
import styles from "./caption.module.css"
const config = {
variants: {
color: {
black: styles.black,
burgundy: styles.burgundy,
pale: styles.pale,
textMediumContrast: styles.textMediumContrast,
red: styles.red,
white: styles.white,
uiTextActive: styles.uiTextActive,
uiTextMediumContrast: styles.uiTextMediumContrast,
},
textTransform: {
bold: styles.bold,
regular: styles.regular,
uppercase: styles.uppercase,
},
textAlign: {
center: styles.center,
left: styles.left,
},
},
defaultVariants: {
color: "black",
textTransform: "regular",
},
} as const
export const captionVariants = cva(styles.caption, config)
const fontOnlyConfig = {
variants: {
textTransform: {
bold: styles.bold,
regular: styles.regular,
uppercase: styles.uppercase,
},
},
defaultVariants: {
textTransform: "regular",
},
} as const
export const fontOnlycaptionVariants = cva(
styles.captionFontOnly,
fontOnlyConfig
)