Demos
No label or value
<Field.Boolean onChange={(value) => console.log('onChange', value)} />
Checkbox
Value: true
<Field.Booleanvariant="checkbox"label="Label text"value={true}onChange={(value) => console.log('onChange', value)}/>
Value false
<Field.Booleanvariant="checkbox"label="Label text"value={false}onChange={(value) => console.log('onChange', value)}/>
Checkbox - Required
<Field.Booleanvariant="checkbox"label="Set to be required initially"onChange={(value) => console.log('onChange', value)}validateInitiallyrequired/>
Checkbox - Disabled
<Field.Booleanvariant="checkbox"label="I am disabled"onChange={(value) => console.log('onChange', value)}disabled/>
Checkbox - Error
This is what is wrong...
<Field.Booleanvariant="checkbox"label="Label text"onChange={(value) => console.log('onChange', value)}error={new Error('This is what is wrong...')}/>
Button
Value true
<Field.Booleanvariant="button"label="Label text"value={true}onChange={(value) => console.log('onChange', value)}/>
Button - Value false
<Field.Booleanvariant="button"label="Label text"value={false}onChange={(value) => console.log('onChange', value)}/>
Button - Required
<Field.Booleanvariant="button"label="Set to be required initially"onChange={(value) => console.log('onChange', value)}validateInitiallyrequired/>
Button - Disabled
<Field.Booleanvariant="button"label="I am disabled"onChange={(value) => console.log('onChange', value)}disabled/>
Button - Error
This is what is wrong...
<Field.Booleanvariant="button"label="Label text"onChange={(value) => console.log('onChange', value)}error={new Error('This is what is wrong...')}/>
Checkbox button
Value: true
<Field.Booleanvariant="checkbox-button"label="Label text"value={true}onChange={(value) => console.log('onChange', value)}/>
Checkbox button - Value false
<Field.Booleanvariant="checkbox-button"label="Label text"value={false}onChange={(value) => console.log('onChange', value)}/>
Checkbox button - Required
<Field.Booleanvariant="checkbox-button"label="Set to be required initially"onChange={(value) => console.log('onChange', value)}validateInitiallyrequired/>
Checkbox button - Disabled
<Field.Booleanvariant="checkbox-button"label="I am disabled"onChange={(value) => console.log('onChange', value)}disabled/>
Checkbox button - Error
This is what is wrong...
<Field.Booleanvariant="checkbox-button"label="Label text"onChange={(value) => console.log('onChange', value)}error={new Error('This is what is wrong...')}/>
Buttons
Value true
<Field.Booleanvariant="buttons"label="Label text"value={true}onChange={(value) => console.log('onChange', value)}/>
Buttons - Value false
<Field.Booleanvariant="buttons"label="Label text"value={false}onChange={(value) => console.log('onChange', value)}/>
Buttons - Required
<Field.Booleanvariant="buttons"label="Set to be required initially"onChange={(value) => console.log('onChange', value)}validateInitiallyrequired/>
Buttons - Disabled
<Field.Booleanvariant="buttons"label="I am disabled"onChange={(value) => console.log('onChange', value)}disabled/>
Buttons - Error
This is what is wrong...
<Field.Booleanvariant="buttons"label="Label text"onChange={(value) => console.log('onChange', value)}error={new Error('This is what is wrong...')}/>