react-toolbox/docs/app/components/layout/main/modules/examples/radio_example_1.txt

23 lines
577 B
Plaintext
Raw Normal View History

2015-11-12 03:07:30 +03:00
class RadioTest extends React.Component {
state = {
value: 'vvendetta'
};
handleChange = (value) => {
this.setState({value});
};
render () {
return (
<RadioGroup name='comic' value={this.state.value} onChange={this.handleChange}>
<RadioButton label='The Walking Dead' value='thewalkingdead'/>
<RadioButton label='From Hell' value='fromhell' disabled/>
<RadioButton label='V for a Vendetta' value='vvendetta'/>
<RadioButton label='Watchmen' value='watchmen'/>
</RadioGroup>
);
}
}
2015-11-01 15:16:14 +03:00
return <RadioTest />;