react-cool-onclickoutside
Advanced tools
Comparing version 0.1.2 to 0.5.0
{ | ||
"name": "react-cool-onclickoutside", | ||
"version": "0.1.2", | ||
"version": "0.5.0", | ||
"description": "React hook to listen for clicks outside of the component(s).", | ||
@@ -59,3 +59,3 @@ "license": "MIT", | ||
"clean": "run-p clean:*", | ||
"coveralls": "yarn test:cov && cat ./coverage/lcov.info | coveralls" | ||
"coveralls": "cat ./coverage/lcov.info | coveralls" | ||
}, | ||
@@ -218,3 +218,3 @@ "husky": { | ||
"eslint-plugin-react-hooks": "^2.3.0", | ||
"husky": "^4.0.2", | ||
"husky": "^4.0.5", | ||
"jest": "^24.9.0", | ||
@@ -221,0 +221,0 @@ "lint-staged": "^9.5.0", |
@@ -58,3 +58,3 @@ # React Cool Onclickoutside | ||
const handleClickBtn = () => { | ||
setOpenMenu(true); | ||
setOpenMenu(!openMenu); | ||
}; | ||
@@ -71,2 +71,4 @@ | ||
[![Edit useOnclickoutside demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/useonclickoutside-demo-g185l?fontsize=14&hidenavigation=1&theme=dark) | ||
Support multiple refs. Callback only be triggered when user clicks outside of the registered components. | ||
@@ -104,3 +106,3 @@ | ||
You must pass the `callback` to use this hook and you can access the [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) or [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent) via the `event` parameter as below: | ||
You must pass the `callback` to use this hook and you can access the [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) or [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent) via the `event` parameter as below. | ||
@@ -107,0 +109,0 @@ ```js |
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
18115
144