Skip to content

Commit

Permalink
fix: useClickAway TypeScript typings
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 29, 2019
1 parent 01e38bc commit 4b20083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useClickAway.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {RefObject, useEffect} from 'react';
import {on, off} from './util';

const useClickAway = (ref: RefObject<HTMLElement | null>, onClickAway: () => void) => {
const useClickAway = (ref: RefObject<HTMLElement | null>, onClickAway: (event: KeyboardEvent) => void) => {
useEffect(() => {
const handler = (event) => {
const {current: el} = ref;
Expand Down

0 comments on commit 4b20083

Please sign in to comment.