Files
web/components/TempDesignSystem/Text/Body/variants.ts
Pontus Dreij 8616e4ab76 Merged in feat/SW-1276-implement-design (pull request #1348)
Feat/SW-1276 implement design

* feat(SW-1276) UI implementation Desktop part 1 for MyStay

* feat(SW-1276) UI implementation Desktop part 2 for MyStay

* feat(SW-1276) UI implementation Mobile part 1 for MyStay

* refactor: move files from MyStay/MyStay to MyStay

* feat(SW-1276) Sidepeek implementation

* feat(SW-1276): Refactoring

* feat(SW-1276) UI implementation Mobile part 2 for MyStay

* feat(SW-1276): translations

* feat(SW-1276) fixed skeleton

* feat(SW-1276): Added missing translations

* feat(SW-1276): Removed console log

* feat(SW-1276) fixed translations

* feat(SW-1276): Added translations

* feat(SW-1276) fix dynamic ID:s

* feat(SW-1276) removed createElement

* feat(SW-1276): Fixed build errors

* feat(SW-1276): Updated label

* feat(SW-1276): Rewrite SummaryCard


Approved-by: Niclas Edenvin
2025-02-18 14:20:54 +00:00

72 lines
1.9 KiB
TypeScript

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)