import React from 'react';
/* BEGIN CheckBox: styled checkbox */
export default class CheckBox extends React.PureComponent {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
}
handleChange() {
this.props.onChange(this.props.name, !this.props.checked);
}
render() {
return (
this.props.onChange ? (
this.props.checked ?
check_box :
check_box_outline_blank
) : (
this.props.checked ?
check_box :
check_box_outline_blank
)
);
}
}
/* END CheckBox */