Skip to content

Instantly share code, notes, and snippets.

@codedmart
Created April 7, 2015 19:54
Show Gist options
  • Select an option

  • Save codedmart/e8fed077946a4f6b38af to your computer and use it in GitHub Desktop.

Select an option

Save codedmart/e8fed077946a4f6b38af to your computer and use it in GitHub Desktop.
/** @jsx React.DOM */
var React = require('react');
module.exports = React.createClass({
getInitialState: function() {
return {
sameAsBilling: true
}
},
onChange: function(e) {
e.preventDefault();
this.setState({sameAsBilling: !this.state.sameAsBilling});
},
render: function() {
return <div>
<input type='checkbox' className='full' id='sameAsBilling' ref='sameAsBillingCheckbox' checked={this.state.sameAsBilling} onChange={this.onChange}/>
<label htmlFor='sameAsBilling'>
<span className='small check-label'></span>Same as billing
</label>
</div>
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment