@blaze-react/radio-button
v0.8.0-alpha.112
Published
Radio button allows user to choose only one of the pre-defined options. Each radio button must be accompanied by a label describing the choice it represent.
Keywords
Readme
Description
Radio button allows user to choose only one of the pre-defined options. Each radio button must be accompanied by a label describing the choice it represent.
Usage
const options = [
{
label: 'A',
value: 1,
id: 'one',
},
{
label: 'B',
value: 2,
required: true,
id: 'two',
},
{
label: 'C',
value: 3,
id: 'three',
},
{
label: 'Disabled',
value: '',
disabled: true,
id: 'four',
},
];
<RadioButton required options={options} onChange={({ event, selected }) => {}} />;API
RadioButton can receive a number of props as follow:
| NAME | TYPE | DEFAULT | | :------- | :------: | :------: | | options | Array | [] | | required | Boolean | false | | onChange | Function | () => {} |
