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
74 lines
1.7 KiB
TypeScript
74 lines
1.7 KiB
TypeScript
import { cva } from "class-variance-authority"
|
|
|
|
import styles from "./caption.module.css"
|
|
|
|
const config = {
|
|
variants: {
|
|
type: {
|
|
regular: styles.regular,
|
|
bold: styles.bold,
|
|
label: styles.labels,
|
|
underline: styles.underline,
|
|
},
|
|
color: {
|
|
baseTextAccent: styles.baseTextAccent,
|
|
black: styles.black,
|
|
burgundy: styles.burgundy,
|
|
pale: styles.pale,
|
|
textMediumContrast: styles.textMediumContrast,
|
|
red: styles.red,
|
|
white: styles.white,
|
|
green: styles.green,
|
|
blue: styles.blue,
|
|
uiTextHighContrast: styles.uiTextHighContrast,
|
|
uiTextActive: styles.uiTextActive,
|
|
uiTextMediumContrast: styles.uiTextMediumContrast,
|
|
uiTextPlaceholder: styles.uiTextPlaceholder,
|
|
disabled: styles.disabled,
|
|
baseTextHighContrast: styles.baseTextHighContrast,
|
|
baseTextMediumContrast: styles.baseTextMediumContrast,
|
|
},
|
|
textTransform: {
|
|
uppercase: styles.uppercase,
|
|
},
|
|
textAlign: {
|
|
center: styles.center,
|
|
left: styles.left,
|
|
},
|
|
uppercase: {
|
|
true: styles.uppercase,
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
color: "black",
|
|
type: "regular",
|
|
},
|
|
} as const
|
|
|
|
export const captionVariants = cva(styles.caption, config)
|
|
|
|
const fontOnlyConfig = {
|
|
variants: {
|
|
type: {
|
|
regular: styles.regular,
|
|
bold: styles.bold,
|
|
label: styles.labels,
|
|
underline: styles.underline,
|
|
},
|
|
textTransform: {
|
|
uppercase: styles.uppercase,
|
|
},
|
|
uppercase: {
|
|
true: styles.uppercase,
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
type: "regular",
|
|
},
|
|
} as const
|
|
|
|
export const fontOnlycaptionVariants = cva(
|
|
styles.captionFontOnly,
|
|
fontOnlyConfig
|
|
)
|