Skip to content

Instantly share code, notes, and snippets.

@kevinold
Created January 14, 2015 04:17
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 kevinold/8be4c986f3659887fe4f to your computer and use it in GitHub Desktop.
Save kevinold/8be4c986f3659887fe4f to your computer and use it in GitHub Desktop.
/*** @jsx React.DOM */
//var React = require('React');
var Attachment = React.createClass({
getInitialState: function() {
return {
intent: false
};
},
createUpload: function() {
//
},
toggleIntent: function(event){
var val = event.target.checked;
this.setState({
intent: val
});
},
render: function() {
return (
<div className="checkbox">
<label>
<input type="checkbox" id="test" checked={this.state.intent} onChange={this.toggleIntent} />
{this.state.intent ? 'true' : 'false'}
</label>
</div>
)
}
});
//module.exports = Attachment;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment