1
0
mirror of synced 2024-12-04 18:47:56 +01:00
bemaniutils/bemani/frontend/static/components/nav.react.js
2019-12-08 21:43:49 +00:00

33 lines
810 B
JavaScript

/** @jsx React.DOM */
var Nav = React.createClass({
render: function() {
var cls = 'nav';
if (this.props.active) {
cls += ' active';
}
cls += " " + this.props.title;
var title = (
<span>
{this.props.title}
{this.props.showAlert ?
<span className="alert">&#9888;</span> :
null
}
</span>
);
return (
<Button
className={cls}
disabled={this.props.disabled}
style={this.props.style}
onClick={function(event) {
this.props.onClick(event);
}.bind(this)}
title={title}
/>
);
},
});