Skip to content

Instantly share code, notes, and snippets.

@gregturn
Created February 7, 2017 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregturn/7243c0bd66a080870fa76750a5b85406 to your computer and use it in GitHub Desktop.
Save gregturn/7243c0bd66a080870fa76750a5b85406 to your computer and use it in GitHub Desktop.
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