JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://fb.me/react-with-addons-0.11.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.11.0.js"></script>
<script src="http://fb.me/react-js-fiddle-integration.js"></script>
<script src="https://rawgit.com/react-bootstrap/react-bootstrap-bower/master/react-bootstrap.min.js"></script>
JavaScript 1.7
/** @jsx React.DOM */
var Hello = React.createClass({
handleGreenSquare: function(value) {
console.log(value);
},
render: function() {
return <ReactBootstrap.Navbar brand="Whoops">
<ReactBootstrap.Panel header="Green Square">
<ReactBootstrap.ButtonToolbar>
<ReactBootstrap.Button bsStyle="info" onClick={this.handleGreenSquare.bind(this, true)}><ReactBootstrap.Glyphicon glyph="ok-circle"/> On</ReactBootstrap.Button>
<ReactBootstrap.Button bsStyle="info" onClick={this.handleGreenSquare.bind(this, false)}><ReactBootstrap.Glyphicon glyph="remove-circle"/> Off</ReactBootstrap.Button>
</ReactBootstrap.ButtonToolbar>
</ReactBootstrap.Panel>
</ReactBootstrap.Navbar>;
}
});
React.renderComponent(<Hello />, document.body);