mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 17:47:16 +00:00
25 lines
597 B
JavaScript
25 lines
597 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
import classnames from "classnames";
|
|
|
|
import { TOGGLE_EQ_AUTO } from "../actionTypes";
|
|
|
|
class EqAuto extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.handleClick = this.handleClick.bind(this);
|
|
}
|
|
|
|
handleClick() {
|
|
this.props.dispatch({ type: TOGGLE_EQ_AUTO });
|
|
}
|
|
|
|
render() {
|
|
const className = classnames({
|
|
selected: this.props.auto
|
|
});
|
|
return <div id="auto" className={className} onClick={this.handleClick} />;
|
|
}
|
|
}
|
|
|
|
export default connect(state => state.equalizer)(EqAuto);
|