Releases: trendmicro-frontend/react-radio
Releases · trendmicro-frontend/react-radio
v4.0.0-alpha
Refresh dist files and docs
v3.2.2
v3.2.1
v3.2.0
Add a "depth" prop to limit the recursion depth when rendering radio buttons deeply inside a radio group (6750fe8)
Example
<RadioGroup
name="comic"
value={this.state.value}
depth={3} // This is needed to minimize the recursion overhead
onChange={(value, event) => {
this.setState({ value: value });
}}
>
<div className="row">
<div className="col-xs-12 col-sm-6">
<RadioButton label="Batman (DC)" value="dc:batman" />
<RadioButton label="Hulk (Marvel)" value="marvel:hulk" />
</div>
<div className="col-xs-12 col-sm-6">
<RadioButton label="Superman (DC)" value="dc:superman" />
<RadioButton label="Spider-Man (Marvel)" value="marvel:spiderman" disabled />
</div>
</div>
</RadioGroup>
v3.1.3
v3.1.2
v3.1.1
v3.1.0
v3.0.0
Breaking
- Renamed react-radio-button to react-radio
What's New
- Adds RadioGroup component
<RadioGroup
name="comic"
value={this.state.value}
onChange={(value, event) => {
this.setState({ value: value });
}}
>
<div className="row">
<div className="col-xs-12 col-sm-6">
<RadioButton label="Batman (DC)" value="dc:batman" />
<RadioButton label="Hulk (Marvel)" value="marvel:hulk" />
</div>
<div className="col-xs-12 col-sm-6">
<RadioButton label="Superman (DC)" value="dc:superman" />
<RadioButton label="Spider-Man (Marvel)" value="marvel:spiderman" disabled />
</div>
</div>
</RadioGroup>
v2.0.0
Refactors RadioButton component that attaches text label next to the radio button
Usage
<RadioButton label="RadioButton label" />
The label prop is optional, you can use children to pass through the component.
<RadioButton label="RadioButton label">
<p style={{ marginLeft: 24 }}>
Lorem ipsum dolor sit amet...
</p>
</RadioButton>
<RadioButton>
<span style={{ verticalAlign: 'middle', marginLeft: 8 }}>
Lorem ipsum dolor sit amet...
</span>
</RadioButton>
Uncontrolled RadioButton
// Default checked
<RadioButton defaultChecked />
Controlled RadioButton
// Checked
<RadioButton checked />