Files
web/components/TempDesignSystem/Text/Body/variants.ts

54 lines
1.2 KiB
TypeScript

import { cva } from "class-variance-authority"
import styles from "./body.module.css"
const config = {
variants: {
color: {
black: styles.black,
burgundy: styles.burgundy,
grey: styles.grey,
pale: styles.pale,
red: styles.red,
textMediumContrast: styles.textMediumContrast,
white: styles.white,
peach50: styles.peach50,
},
textAlign: {
center: styles.textAlignCenter,
left: styles.textAlignLeft,
},
textTransform: {
bold: styles.bold,
regular: styles.regular,
underlined: styles.underlined,
},
},
defaultVariants: {
color: "black",
textAlign: "left",
textTransform: "regular",
},
} as const
export const bodyVariants = cva(styles.body, config)
const fontOnlyconfig = {
variants: {
textAlign: {
center: styles.textAlignCenter,
left: styles.textAlignLeft,
},
textTransform: {
bold: styles.bold,
regular: styles.regular,
underlined: styles.underlined,
},
},
defaultVariants: {
textAlign: "left",
textTransform: "regular",
},
} as const
export const bodyFontOnlyVariants = cva(styles.bodyFontOnly, fontOnlyconfig)