mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 01:29:22 +00:00
29 lines
605 B
JavaScript
29 lines
605 B
JavaScript
import React from 'react';
|
|
import {connect} from 'react-redux';
|
|
import classnames from 'classnames';
|
|
|
|
import {TOGGLE_EQ_ON} from '../actionTypes';
|
|
|
|
class EqOn extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.handleClick = this.handleClick.bind(this);
|
|
}
|
|
|
|
handleClick() {
|
|
this.props.dispatch({type: TOGGLE_EQ_ON});
|
|
}
|
|
|
|
render() {
|
|
const className = classnames({
|
|
selected: this.props.on
|
|
});
|
|
return <div
|
|
id='on'
|
|
className={className}
|
|
onClick={this.handleClick}
|
|
/>;
|
|
}
|
|
}
|
|
|
|
module.exports = connect((state) => state.equalizer)(EqOn);
|