@crave/farmblocks-input-radio
v3.6.8
Published
Radio form element.
Downloads
1,220
Readme
Farmblocks Radio
Radio form element. See Storybook
Installation
npm install @crave/farmblocks-input-radio
Usage
import React from "react";
import ReactDOM from "react-dom";
import Radio, { RadioGroup } from "@crave/farmblocks-map-balloon";
const root = document.createElement("div");
ReactDOM.render(
<div>
<RadioGroup name="radioExample" defaultValue="second">
<Radio value="first" label="First" />
<Radio value="second" label="Second (default)" />
<Radio value="third" label="Third (disabled)" disabled />
</RadioGroup>
</div>,
root,
);
document.body.appendChild(root);
API
Radio
label
: nodename
: stringchecked
: booleandisabled
: booleanonClick
: functiononChange
: functionvalue
: any
RadioGroup
defaultValue
: any. If set, the radio option with this value will be automatically checked.name
: string. Will be given to all the children.disabled
: boolean. If set, all the children will be disabled.onChange
: function
License
MIT