chore(SW-3145): Move Footnote to design-system * Move Footnote to design-system Approved-by: Joakim Jäderberg
62 lines
1.3 KiB
TypeScript
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
|
|
)
|