created:7/7/2021
updated:7/7/2021
loc
24
comments
0
passed
3
failed
3
coverage
50%
CheckBoxField
grommet-controls
3.0.2- config
- source
() => (<FormonSubmit={() => console.log('onSubmit')}pad={{ horizontal: 'small' }}focusFirstChild={false}><CheckBoxFieldname="tos"label="Terms of service"validation={[validators.required(),validators.True('Please accept the TOS'),]}/><Box pad="small"><Button type="submit" label="Submit" /></Box></Form>)
Name | Description | Default | |
|---|---|---|---|
IWithFormFieldProps(7 properties) | |||
| validation | default validation rules ValidationType | ValidationType[] | - | |
| name | field name string | - | |
| label | field label ReactNode | - | |
| description | field help/description string | - | |
| controlLabel | if separate - label of the FormField ReactNode | - | |
| inField | whether the field is in a FormField boolean | - | |
| children | child component (props: IFieldProps) => any | - | |
IFieldProps(3 properties) | |||
CheckBoxProps(8 properties) | |||
- config
- source
() => (<FormonSubmit={() => console.log('onSubmit')}pad={{ horizontal: 'small' }}focusFirstChild={false}><CheckBoxFieldname="tos"controlLabel={<Text weight="bold">Terms of service</Text>}label="Terms of service"validation={[validators.required(),validators.True('Please accept the TOS'),]}/><Box pad="small"><Button type="submit" label="Submit" /></Box></Form>)