Methods
# inner AnyFieldLabel(props) → {React.ReactElement}
AnyField is a wrapper around the various field types that implements the react-hook-form Controller
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
object
|
||
htmlFor |
string
|
the id to use for htmlFor | |
error |
string
|
<optional> |
the error message to display |
disabled |
boolean
|
<optional> |
is the field disabled |
required |
boolean
|
<optional> |
is the field required |
label |
string
|
<optional> |
the label to display |
asFormInput |
string
|
<optional> |
whether to render the label using FormLabel or InputLabel |
iconText |
string
|
<optional> |
the text to display in the info icon |
helperText |
string
|
<optional> |
the text to display in the helper text |
fieldOptions |
FieldOptions
|
<optional> |
the options to pass to the field |
a label for a field with an optional info icon and required indicator
React.ReactElement
Type Definitions
Object
# FieldIconOptions
Icons for info icons
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
color |
string
|
<optional> |
the color of the icon |
gap |
string
|
<optional> |
the gap between the label and the icon |
beforeLabel |
boolean
|
<optional> |
whether to display the icon before the label |
iconComponent |
React.Component
|
<optional> |
a component to use instead of the default InfoIcon |
iconText |
string
|
<optional> |
the text to display in the info icon |
Object
# FieldLabelThemeGroup
Theme group for the label
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
anyFieldLabel |
object
|
<optional> |
any theme properties to use for the box containing the label |
helperText |
object
|
<optional> |
any theme properties to use for the helper text |
Object
# FieldOptions
Various options for the fields
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
icon |
FieldIconOptions
|
<optional> |
the options to pass to the info icon |
labelThemeGroup |
FieldLabelThemeGroup
|
<optional> |
the theme group to use for the label |