var ChapterSectionMixin, React, _;
React = require('react');
ChapterSectionMixin = require('openstax-react-components').ChapterSectionMixin;
_ = require('underscore');
module.exports = React.createClass({
displayName: 'ChapterSection',
propTypes: {
section: React.PropTypes.oneOfType([React.PropTypes.array, React.PropTypes.string]).isRequired
},
componentWillMount: function() {
return this.setState({
skipZeros: false
});
},
mixins: [ChapterSectionMixin],
render: function() {
var section;
section = this.props.section;
return React.createElement("span", {
"className": "chapter-section",
"data-chapter-section": this.sectionFormat(section)
}, this.sectionFormat(section));
}
});
|