Merged in chore/sw-3145-move-body (pull request #2505)
chore(SW-3145): Move Body component to design-system * Move Body component to design-system Approved-by: Joakim Jäderberg
This commit is contained in:
71
packages/design-system/lib/components/Body/variants.ts
Normal file
71
packages/design-system/lib/components/Body/variants.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import { cva } from 'class-variance-authority'
|
||||
|
||||
import styles from './body.module.css'
|
||||
|
||||
const config = {
|
||||
variants: {
|
||||
color: {
|
||||
black: styles.black,
|
||||
burgundy: styles.burgundy,
|
||||
disabled: styles.disabled,
|
||||
grey: styles.grey,
|
||||
pale: styles.pale,
|
||||
red: styles.red,
|
||||
textMediumContrast: styles.textMediumContrast,
|
||||
baseTextMediumContrast: styles.baseTextMediumContrast,
|
||||
baseTextHighContrast: styles.baseTextHighContrast,
|
||||
white: styles.white,
|
||||
peach50: styles.peach50,
|
||||
uiTextHighContrast: styles.uiTextHighContrast,
|
||||
uiTextMediumContrast: styles.uiTextMediumContrast,
|
||||
uiTextPlaceholder: styles.uiTextPlaceholder,
|
||||
primaryLight: styles.primaryLight,
|
||||
secondaryLight: styles.secondaryLight,
|
||||
tertiaryLight: styles.tertiaryLight,
|
||||
primaryDark: styles.primaryDark,
|
||||
primaryDim: styles.primaryDim,
|
||||
primaryStrong: styles.primaryStrong,
|
||||
baseText: styles.baseText,
|
||||
success: styles.success,
|
||||
},
|
||||
textAlign: {
|
||||
center: styles.textAlignCenter,
|
||||
left: styles.textAlignLeft,
|
||||
right: styles.textAlignRight,
|
||||
},
|
||||
textTransform: {
|
||||
bold: styles.bold,
|
||||
regular: styles.regular,
|
||||
underlined: styles.underlined,
|
||||
uppercase: styles.uppercase,
|
||||
},
|
||||
},
|
||||
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,
|
||||
right: styles.textAlignRight,
|
||||
},
|
||||
textTransform: {
|
||||
bold: styles.bold,
|
||||
regular: styles.regular,
|
||||
underlined: styles.underlined,
|
||||
uppercase: styles.uppercase,
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
textAlign: 'left',
|
||||
textTransform: 'regular',
|
||||
},
|
||||
} as const
|
||||
export const bodyFontOnlyVariants = cva(styles.bodyFontOnly, fontOnlyconfig)
|
||||
Reference in New Issue
Block a user