Files
web/components/TempDesignSystem/Text/Caption/variants.ts
2024-09-12 10:12:43 +02:00

50 lines
1000 B
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,
},
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
)