mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
26 lines
644 B
JavaScript
26 lines
644 B
JavaScript
import React from "react";
|
|
import { connect } from "react-redux";
|
|
import classnames from "classnames";
|
|
|
|
import { TOGGLE_PLAYLIST_WINDOW } from "../../actionTypes";
|
|
|
|
const PlaylistToggleButton = props => (
|
|
<div
|
|
id="playlist-button"
|
|
className={classnames({ selected: props.playlist })}
|
|
onClick={props.handleClick}
|
|
title="Toggle Playlist Editor"
|
|
/>
|
|
);
|
|
|
|
const mapStateToProps = state => ({
|
|
playlist: state.windows.playlist
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
handleClick: () => dispatch({ type: TOGGLE_PLAYLIST_WINDOW })
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(
|
|
PlaylistToggleButton
|
|
);
|