1
0
mirror of synced 2024-12-15 15:51:15 +01:00
bemaniutils/bemani/frontend/static/components/slider.react.js
Jennifer Taylor 9feae49667 Massive overhaul to Jubeat frontend, including the following:
- Clan jubility breakdown
 - Displaying music rate and stats identically across all score pages
 - Ability to choose what jubility (legacy or new) to display and sort on all players.
 - Various tweaks and small quality of life improvements.
2022-10-08 01:32:59 +00:00

28 lines
907 B
JavaScript

/** @jsx React.DOM */
var Slider = React.createClass({
render: function() {
return (
<div
className={"slider " + (this.props.value ? "on" : "off")}
onClick={function(event) {
event.preventDefault();
event.stopPropagation();
if (this.props.onChange) {
this.props.onChange(!this.props.value);
}
}.bind(this)}
>{ this.props.value ?
<span>
<span className="ball on"></span>
<span className="label on">{this.props.on}</span>
</span> :
<span>
<span className="label off">{this.props.off}</span>
<span className="ball off"></span>
</span>
}</div>
);
},
});