fix(BOOK-293): changed variants and props on IconButton component * fix(BOOK-293): changed variants and props on IconButton component * fix(BOOK-293): inherit color for icon Approved-by: Bianca Widstam Approved-by: Christel Westerberg
30 lines
564 B
TypeScript
30 lines
564 B
TypeScript
import { inputLabelVariants } from './variants'
|
|
|
|
import type { InputLabelProps } from './types'
|
|
|
|
export function InputLabel({
|
|
children,
|
|
className,
|
|
selected,
|
|
required,
|
|
disabled,
|
|
size,
|
|
...rest
|
|
}: InputLabelProps) {
|
|
const classNames = inputLabelVariants({
|
|
size,
|
|
required,
|
|
selected,
|
|
disabled,
|
|
className,
|
|
})
|
|
|
|
return (
|
|
<span className={classNames} {...rest}>
|
|
{children}
|
|
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
|
|
{required && <span aria-hidden="true">{' *'}</span>}
|
|
</span>
|
|
)
|
|
}
|