DataValue.Boolean
DataValue.Boolean is a base component for displaying values of the type boolean
.
Demos
Empty
<DataValue.Boolean showEmpty />
Placeholder
The value was not filled in
<DataValue.Boolean placeholder="The value was not filled in" />
Value: true
Ja
<DataValue.Boolean value={true} />
Value: false
Nei
<DataValue.Boolean value={false} />
Label
<DataValue.Boolean label="Label text" showEmpty />
Label and value
Nei
<DataValue.Boolean label="Label text" value={false} />
Inline
This is before the componentJaThis is after the component
<><spanstyle={{color: 'red',}}>This is before the component</span><DataValue.Boolean value={true} inline /><spanstyle={{color: 'red',}}>This is after the component</span></>
Inline and label
This is before the componentJaThis is after the component
<><spanstyle={{color: 'red',}}>This is before the component</span><DataValue.Boolean label="Label text" value={true} inline /><spanstyle={{color: 'red',}}>This is after the component</span></>
Properties
Standard value component props
Property | Type | Description |
---|---|---|
value | boolean | (optional) Source data value for the input |
showEmpty | boolean | (optional) True to show the component even when the value is empty. |
label | string | (optional) Field label to show above / before the input feature |
placeholder | string | (optional) Text showing in place of the value if no value is given |
path | string | (optional) JSON Pointer for where the data for this input is located in the source dataset (when using DataContext) |
inline | boolean | (optional) True to show the value without any DOM elements surrounding it. I.e for putting it as part of a text. |