Skip to content

Instantly share code, notes, and snippets.

@naush
Created August 14, 2020 01:59
Show Gist options
  • Save naush/089294bac9e2dfbae9f073a5d3e98774 to your computer and use it in GitHub Desktop.
Save naush/089294bac9e2dfbae9f073a5d3e98774 to your computer and use it in GitHub Desktop.
type ButtonsProps = {
dispatch: React.Dispatch<any>,
};
const Buttons = ({ dispatch, }: ButtonsProps) => {
return (
<>
<UndoIcon
onClick={() => dispatch({ type: Actions.UNDO })}
/>
<BrushIcon
onClick={() => dispatch({ type: Actions.PAINT })}
/>
</>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment