This component is a unstable and under development, its api may change without upgrading a major version.
RadioList
Usage
No examples available.
To build a list of Radios simply use the RadioList component and place all of your options inside of the radios prop.
Props
label: string (or renderable node) (required)inline: boolean (optional)radios: array of objects ({ label: 'whatever', value: 'whatever' }) (node or string for keys) (required)onChange: function (optional) (first param is event) (second param is value parsed from list of radios)name: string (optional)selected: string (or renderable node) (optional)stylised: boolean (optional) (default false)status: string (or renderable node) (optional)success: boolean (optional) (default false)error: boolean (optional) (default false)
Code example
import RadioList from 'radius/dist/m2dm/react/forms/radio-list';
<RadioList
label="some label here"
name="field-name-goes-here"
radios={[
{ label: 'Label name', value: 'value-here' },
{ label: (<div>Another<br />label</div>), value: 2 },
]}
/>
No examples available.