react-toolbox/spec/components/switch.jsx

26 lines
516 B
React
Raw Normal View History

2015-09-21 11:01:52 +03:00
/* global React */
import Switch from '../../components/switch';
export default React.createClass({
displayName: 'SwitchTest',
onChange (event, instance) {
console.log('[SWITCH]', instance.getValue());
},
render () {
return (
<section>
<h2>Switches</h2>
<p>Default</p>
<Switch />
<p>With properties</p>
<Switch value={true} label="Online" onChange={this.onChange} />
<p>Disabled</p>
<Switch disabled/>
</section>
);
}
});