Add a FormLabel component:
interface FormLabelProps {
optional?: string | boolean
tooltip?: ReactNode
}
<FormLabel optional tooltip="some tooltip">{label}</FormLabel>
Also we can use FormLabel in FormTextInput to simplify the usage:
interface FormTextInputProps extends FormLabelProps {}
<FormTextInput optional tooltip="some tooltip" />
Add a
FormLabelcomponent:Also we can use
FormLabelinFormTextInputto simplify the usage: