New boilerplate

This commit is contained in:
Christian Alfoni
2014-10-27 15:28:16 +01:00
parent 54bbfd3ce2
commit 633e48461c
29 changed files with 2609 additions and 29544 deletions

View File

@@ -1,7 +1,10 @@
/** @jsx React.DOM */
var React = require('flux-react');
var React = require('react');
var ColoredCheckbox = React.createClass({
changeColor: function () {
this.props.onChange(this.props.color);
},
render: function() {
var style = {
backgroundColor: this.props.color,
@@ -10,7 +13,7 @@ var ColoredCheckbox = React.createClass({
return (
<span key={this.props.key} style={style}>
<input type="checkbox"
onChange={this.props.onChange.bind(null, this.props.color)}
onChange={this.changeColor}
checked={this.props.checked}/>
</span>
);