We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8067179 + 8d1b9cf commit 90fe0d2Copy full SHA for 90fe0d2
src/index.tsx
@@ -4,7 +4,7 @@ type MouseEvents = 'click' | 'mousedown' | 'mouseup';
4
type TouchEvents = 'touchstart' | 'touchend';
5
6
interface Props {
7
- onClickAway: Function;
+ onClickAway: (event: MouseEvent | TouchEvent) => void;
8
mouseEvent?: MouseEvents;
9
touchEvent?: TouchEvents;
10
}
@@ -23,7 +23,7 @@ const ClickAwayListener: FunctionComponent<Props> = ({
23
return;
24
25
26
- onClickAway();
+ onClickAway(event);
27
};
28
29
document.addEventListener(mouseEvent, handleEvents);
0 commit comments