2015-10-05 10:12:16 +03:00
|
|
|
/* global React */
|
|
|
|
|
|
|
|
import Checkbox from '../../components/checkbox';
|
|
|
|
|
|
|
|
export default React.createClass({
|
2015-10-06 22:18:39 +03:00
|
|
|
handleChange (event, instance) {
|
|
|
|
console.log('Changed!', instance.getValue());
|
2015-10-05 10:12:16 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
handleFocus () {
|
|
|
|
console.log('Focused');
|
|
|
|
},
|
|
|
|
|
|
|
|
handleBlur () {
|
|
|
|
console.log('Blur');
|
|
|
|
},
|
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<section>
|
|
|
|
<h2>Checkbox</h2>
|
|
|
|
<p style={{marginBottom: '10px'}}>Lorem ipsum...</p>
|
|
|
|
<Checkbox
|
|
|
|
label="Checked checkbox"
|
|
|
|
checked
|
|
|
|
onChange={this.handleChange}
|
|
|
|
onFocus={this.handleFocus}
|
|
|
|
onBlur={this.handleBlur}
|
|
|
|
/>
|
|
|
|
<Checkbox
|
|
|
|
label="Not checked biatch"
|
|
|
|
onChange={this.handleChange}
|
|
|
|
onFocus={this.handleFocus}
|
|
|
|
onBlur={this.handleBlur}
|
|
|
|
/>
|
|
|
|
<Checkbox
|
|
|
|
label="Disabled checkbox"
|
|
|
|
checked
|
|
|
|
disabled
|
|
|
|
onChange={this.handleChange}
|
|
|
|
onFocus={this.handleFocus}
|
|
|
|
onBlur={this.handleBlur}
|
|
|
|
/>
|
|
|
|
</section>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|