mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
21 lines
576 B
JavaScript
21 lines
576 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
import classnames from "classnames";
|
|
import { toggleShuffle } from "../../actionCreators";
|
|
|
|
const Shuffle = ({ shuffle, handleClick }) => (
|
|
<div
|
|
id="shuffle"
|
|
className={classnames({ selected: shuffle })}
|
|
onClick={handleClick}
|
|
title="Toggle Shuffle"
|
|
/>
|
|
);
|
|
const mapStateToProps = state => ({
|
|
shuffle: state.media.shuffle
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
handleClick: () => dispatch(toggleShuffle())
|
|
});
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Shuffle);
|