mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
22 lines
484 B
JavaScript
22 lines
484 B
JavaScript
import React from 'react';
|
|
import {connect} from 'react-redux';
|
|
|
|
|
|
class Shuffle extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.handleClick = this.handleClick.bind(this);
|
|
}
|
|
handleClick() {
|
|
this.props.dispatch({type: 'TOGGLE_SHUFFLE'});
|
|
}
|
|
render() {
|
|
return <div
|
|
id='shuffle'
|
|
className={this.props.shuffle ? 'selected' : ''}
|
|
onClick={this.handleClick}
|
|
/>;
|
|
}
|
|
}
|
|
|
|
module.exports = connect(state => state.media)(Shuffle);
|