Skip to content

Commit

Permalink
fix(useKeyboardJs): fix argument type error
Browse files Browse the repository at this point in the history
  • Loading branch information
dabuside committed Aug 2, 2019
1 parent a53c8c5 commit 8c820ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/useKeyboardJs.md
Expand Up @@ -37,5 +37,5 @@ yarn add keyboardjs
## Reference

```js
useKeyboardJs(combination: string): [isPressed: boolean, event?: KeyboardEvent]
useKeyboardJs(combination: string | string[]): [isPressed: boolean, event?: KeyboardEvent]
```
2 changes: 1 addition & 1 deletion src/useKeyboardJs.ts
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
import useMount from './useMount';

const useKeyboardJs = (combination: string) => {
const useKeyboardJs = (combination: string | string[]) => {
const [state, set] = useState<[boolean, null | KeyboardEvent]>([false, null]);
const [keyboardJs, setKeyboardJs] = useState<any>(null);

Expand Down

0 comments on commit 8c820ce

Please sign in to comment.