Auto eslint fix

This commit is contained in:
James Barnsley
2019-09-05 15:36:11 +12:00
parent 4513a0d109
commit e4d53a2d35
126 changed files with 23283 additions and 23573 deletions

View File

@ -4,35 +4,34 @@ import React from 'react';
import Icon from '../Icon';
import * as helpers from '../../helpers';
export default class VolumeControl extends React.Component{
export default class VolumeControl extends React.Component {
constructor(props) {
super(props);
constructor(props){
super(props);
this.handleChange = helpers.throttle(this.handleChange.bind(this), 100);
}
this.handleChange = helpers.throttle(this.handleChange.bind(this), 100);
}
handleChange(value){
this.props.onVolumeChange(value, this.props.volume);
}
handleChange(value) {
this.props.onVolumeChange(value, this.props.volume);
}
render(){
return (
<div className={"slider__wrapper "+(this.props.className ? this.props.className : "")}>
<div className={"slider slider--volume "+(this.props.mute ? "slider--muted" : "")}>
<input
className="slider__input"
type="range"
min="0"
max="25"
value={this.props.volume/4}
onChange={e => this.handleChange(parseInt(e.target.value)*4)}
/>
<div className="slider__track">
<div className="slider__track__progress" style={{ width: this.props.volume+'%' }}></div>
</div>
</div>
</div>
);
}
render() {
return (
<div className={`slider__wrapper ${this.props.className ? this.props.className : ''}`}>
<div className={`slider slider--volume ${this.props.mute ? 'slider--muted' : ''}`}>
<input
className="slider__input"
type="range"
min="0"
max="25"
value={this.props.volume / 4}
onChange={(e) => this.handleChange(parseInt(e.target.value) * 4)}
/>
<div className="slider__track">
<div className="slider__track__progress" style={{ width: `${this.props.volume}%` }} />
</div>
</div>
</div>
);
}
}