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
23 lines
390 B
TypeScript
23 lines
390 B
TypeScript
import { inputLabelVariants } from './variants'
|
|
|
|
import type { InputLabelProps } from './types'
|
|
|
|
export function InputLabel({
|
|
children,
|
|
className,
|
|
selected,
|
|
required,
|
|
disabled,
|
|
size,
|
|
}: InputLabelProps) {
|
|
const classNames = inputLabelVariants({
|
|
size,
|
|
required,
|
|
selected,
|
|
disabled,
|
|
className,
|
|
})
|
|
|
|
return <span className={classNames}>{children}</span>
|
|
}
|