Created
February 7, 2017 05:34
-
-
Save gregturn/7243c0bd66a080870fa76750a5b85406 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const React = require('react') | |
class CheckboxInput extends React.Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { | |
let labelLayout = 'layout__item u-1/2-lap-and-up u-1/4-desk' | |
let inputLayout = 'layout__item u-1/2-lap-and-up u-1/2-desk' | |
let lineItemLayout = 'control-group' | |
return (<li className={lineItemLayout}> | |
<label className={labelLayout}>{this.props.label}</label> | |
<input className={inputLayout} type="checkbox" | |
name={this.props.name} | |
checked={this.props.settings[this.props.name]} | |
onChange={this.props.handleChange} /> | |
</li> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment