Files
web/packages/design-system/lib/components/Footnote/variants.ts
Anton Gunnarsson 0ffb40e94b Merged in chore/sw-3145-move-footnote (pull request #2506)
chore(SW-3145): Move Footnote to design-system

* Move Footnote to design-system


Approved-by: Joakim Jäderberg
2025-07-03 08:14:18 +00:00

62 lines
1.3 KiB
TypeScript

import { cva } from 'class-variance-authority'
import styles from './footnote.module.css'
const config = {
variants: {
type: {
regular: styles.regular,
bold: styles.bold,
label: styles.labels,
},
color: {
black: styles.black,
burgundy: styles.burgundy,
pale: styles.pale,
peach50: styles.peach50,
uiTextMediumContrast: styles.uiTextMediumContrast,
uiTextHighContrast: styles.uiTextHighContrast,
uiTextPlaceholder: styles.uiTextPlaceholder,
white: styles.white,
baseTextDisabled: styles.baseTextDisabled,
},
textAlign: {
center: styles.center,
left: styles.left,
},
textTransform: {
uppercase: styles.uppercase,
},
},
defaultVariants: {
type: 'regular',
},
} as const
export const footnoteVariants = cva(styles.footnote, config)
const fontOnlyConfig = {
variants: {
type: {
regular: styles.regular,
bold: styles.bold,
label: styles.labels,
},
textAlign: {
center: styles.center,
left: styles.left,
},
textTransform: {
uppercase: styles.uppercase,
},
},
defaultVariants: {
type: 'regular',
},
} as const
export const footnoteFontOnlyVariants = cva(
styles.footnoteFontOnly,
fontOnlyConfig
)