mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
26 lines
622 B
JavaScript
26 lines
622 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 = {
|
|
handleClick: () => ({ type: TOGGLE_PLAYLIST_WINDOW })
|
|
};
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(
|
|
PlaylistToggleButton
|
|
);
|