react-hotkeys-hook
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "react-hotkeys-hook", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "dist/index.js", | ||
@@ -17,5 +17,3 @@ "typings": "dist/index.d.ts", | ||
"dependencies": { | ||
"hotkeys-js": "^3.4.1", | ||
"react": "^16.8.0-alpha.0", | ||
"react-dom": "^16.8.0-alpha.0" | ||
"hotkeys-js": "^3.4.1" | ||
}, | ||
@@ -38,2 +36,4 @@ "devDependencies": { | ||
"parcel-bundler": "^1.11.0", | ||
"react": "^16.8.0-alpha.0", | ||
"react-dom": "^16.8.0-alpha.0", | ||
"typescript": "^3.2.2" | ||
@@ -40,0 +40,0 @@ }, |
# react-hotkeys-hook | ||
React hook for using keyboard shortcuts in components. | ||
This is a hook version for the [hotkeys-js] package. | ||
This is a hook version for the [hotkeys] package. | ||
@@ -54,6 +54,9 @@ ### Installation | ||
`useHotkey(key: string, (keys: string, callback: (event: KeyboardEvent, handler: HotkeysEvent) => void))` | ||
```typescript | ||
useHotkey(keys: string, callback: (event: KeyboardEvent, handler: HotkeysEvent) => void) | ||
``` | ||
The `useHotkey` hook follows the [hotkeys] call signature. | ||
The callback function takes the exact parameters as the callback function in the hotkeys-js package. | ||
See [hotkeys-js] documentation for more info or look into the typings file. | ||
See [hotkeys] documentation for more info or look into the typings file. | ||
@@ -74,2 +77,2 @@ ### Found an issue or have a feature request? | ||
[hotkeys-js]: https://github.com/jaywcjlove/hotkeys | ||
[hotkeys]: https://github.com/jaywcjlove/hotkeys |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
473121
3
76
18
- Removedreact@^16.8.0-alpha.0
- Removedreact-dom@^16.8.0-alpha.0