feat: (SW-3655) new Input and FormInput components * First version new Input and FormInput components * Handle aria-describedby with react-aria instead of manually add it * Update breaking unit and stories tests * Merge branch 'master' into feat/SW-3655-input-component * Update example form * Merge branch 'master' into feat/SW-3655-input-component * New lock file Approved-by: Linus Flood
27 lines
509 B
TypeScript
27 lines
509 B
TypeScript
import { cva } from 'class-variance-authority'
|
|
|
|
import styles from './inputLabel.module.css'
|
|
|
|
export const inputLabelVariants = cva(styles.inputLabel, {
|
|
variants: {
|
|
size: {
|
|
small: styles.small,
|
|
regular: styles.regular,
|
|
discreet: styles.discreet,
|
|
},
|
|
required: {
|
|
true: styles.required,
|
|
},
|
|
selected: {
|
|
true: styles.selected,
|
|
},
|
|
disabled: {
|
|
true: styles.disabled,
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
size: 'regular',
|
|
required: false,
|
|
},
|
|
})
|