Code coverage report for src/components/qa/content-toggle.cjsx

Statements: 55.56% (5 / 9)      Branches: 0% (0 / 2)      Functions: 0% (0 / 2)      Lines: 55.56% (5 / 9)      Ignored: none     

All files » src/components/qa/ » content-toggle.cjsx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30                                                  
var BS, QAContentToggle, React;
 
React = require('react');
 
BS = require('react-bootstrap');
 
QAContentToggle = React.createClass({displayName: "QAContentToggle",
  propTypes: {
    onChange: React.PropTypes.func.isRequired,
    isShowingBook: React.PropTypes.bool.isRequired
  },
  onClick: function() {
    return this.props.onChange({
      book: !this.props.isShowingBook,
      exercises: this.props.isShowingBook
    });
  },
  render: function() {
    var text;
    text = this.props.isShowingBook ? 'Show Exercises' : 'Show Content';
    return React.createElement(BS.NavItem, {
      "className": 'teacher-edition',
      "onClick": this.onClick
    }, text);
  }
});
 
module.exports = QAContentToggle;