fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
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>
|
|
)
|
|
}
|