@self-assert/react / FormFieldProps
Type Alias: FormFieldProps<Model, ContainerType>
FormFieldProps<
Model,ContainerType> =React.ComponentPropsWithoutRef<ContainerType> &object
Type declaration
draftAssistant
draftAssistant:
DraftAssistant<Model>
brokenRulesDescriptions?
optionalbrokenRulesDescriptions:string[]
Descriptions to be shown as error messages.
showErrorMessage?
optionalshowErrorMessage:boolean
Whether or not to show the broken rules descriptions of the DraftAssistant.
Default
ts
trueas?
optionalas:ContainerType
The HTML element to use as the container.
Default
ts
"div"inputProps?
optionalinputProps:React.InputHTMLAttributes<HTMLInputElement> &Record<`data-${string}`,unknown>
The HTML attributes to apply to the input element.
labelText?
optionallabelText:string
labelProps?
optionallabelProps:React.LabelHTMLAttributes<HTMLLabelElement> &Record<`data-${string}`,unknown>
Type Parameters
| Type Parameter | Default type |
|---|---|
Model extends string | - |
ContainerType extends React.ElementType | "div" |
