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