mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Type Shade button
This commit is contained in:
parent
58dafaffa4
commit
df93ec482c
1 changed files with 11 additions and 4 deletions
|
|
@ -3,8 +3,13 @@ import { connect } from "react-redux";
|
|||
import ClickedDiv from "../ClickedDiv";
|
||||
|
||||
import { toggleMainWindowShadeMode } from "../../actionCreators";
|
||||
import { Dispatch } from "../../types";
|
||||
|
||||
const Shade = props => (
|
||||
interface DispatchProps {
|
||||
handleClick(): void;
|
||||
}
|
||||
|
||||
const Shade = (props: DispatchProps) => (
|
||||
<ClickedDiv
|
||||
id="shade"
|
||||
onMouseDown={props.handleClick}
|
||||
|
|
@ -13,11 +18,13 @@ const Shade = props => (
|
|||
/>
|
||||
);
|
||||
|
||||
const mapDispatchToProps = {
|
||||
handleClick: toggleMainWindowShadeMode
|
||||
const mapDispatchToProps = (dispatch: Dispatch): DispatchProps => {
|
||||
return {
|
||||
handleClick: () => dispatch(toggleMainWindowShadeMode())
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(
|
||||
() => ({}),
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(Shade);
|
||||
Loading…
Add table
Add a link
Reference in a new issue