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