mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-01 22:45:18 +00:00
Type Playlist Action Area
This commit is contained in:
parent
7e7f7e6877
commit
d799218a0b
1 changed files with 20 additions and 8 deletions
|
|
@ -12,8 +12,18 @@ import {
|
|||
|
||||
import MiniTime from "../MiniTime";
|
||||
import RunningTimeDisplay from "./RunningTimeDisplay";
|
||||
import { Dispatch } from "../../types";
|
||||
|
||||
const PlaylistWindow = props => (
|
||||
interface Props {
|
||||
previous: () => void;
|
||||
play: () => void;
|
||||
pause: () => void;
|
||||
stop: () => void;
|
||||
next: () => void;
|
||||
openMediaFileDialog: () => void;
|
||||
}
|
||||
|
||||
const PlaylistWindow = (props: Props) => (
|
||||
<React.Fragment>
|
||||
<RunningTimeDisplay />
|
||||
<div className="playlist-action-buttons">
|
||||
|
|
@ -31,13 +41,15 @@ const PlaylistWindow = props => (
|
|||
</React.Fragment>
|
||||
);
|
||||
|
||||
const mapDispatchToProps = {
|
||||
play,
|
||||
pause,
|
||||
stop,
|
||||
openMediaFileDialog,
|
||||
next,
|
||||
previous
|
||||
const mapDispatchToProps = (dispatch: Dispatch): Props => {
|
||||
return {
|
||||
play: () => dispatch(play()),
|
||||
pause: () => dispatch(pause()),
|
||||
stop: () => dispatch(stop()),
|
||||
openMediaFileDialog: () => dispatch(openMediaFileDialog()),
|
||||
next: () => dispatch(next()),
|
||||
previous: () => dispatch(previous())
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(
|
||||
Loading…
Add table
Add a link
Reference in a new issue