use-dismiss
Version:
React hook that triggers a callback when user clicks outside the element.
84 lines (83 loc) • 2.17 kB
JSON
{
"name": "use-dismiss",
"version": "2.0.3",
"description": "React hook that triggers a callback when user clicks outside the element.",
"author": {
"name": "Brandon Pittman",
"email": "github@brandonpittman.net",
"url": "https://twitter.com/brandonpittman"
},
"keywords": [
"react",
"hooks",
"react-hooks",
"click outside",
"onclickoutside",
"click",
"escape",
"dismiss",
"domout",
"document",
"browser",
"callback"
],
"files": [
"dist"
],
"main": "dist/index.js",
"scripts": {
"build": "yarn test && babel src --out-dir dist --ignore 'src/__tests__'",
"example": "cd example && yarn install && yarn package",
"prepublishOnly": "yarn build",
"test": "jest",
"watch": "nodemon --watch src --exec \"yarn build\""
},
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.4",
"@testing-library/dom": "^7.24.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.2",
"@testing-library/react-hooks": "^3.4.1",
"@testing-library/user-event": "^12.1.4",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-jest": "^24.0.1",
"eslint-plugin-jest-dom": "^3.2.3",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.2",
"eslint-plugin-testing-library": "^3.8.0",
"husky": ">=4",
"jest": "^26.4.2",
"lint-staged": ">=10",
"nodemon": "^2.0.2",
"prettier": "^2.1.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-test-renderer": "^16.13.1"
},
"repository": {
"type": "git",
"url": "https://github.com/brandonpittman/use-dismiss"
},
"bugs": {
"url": "https://github.com/brandonpittman/use-dismiss/issues"
},
"peerDependencies": {
"react": ">=16.13.1"
},
"dependencies": {},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,css,md}": "prettier --write",
"*.js": "eslint --cache --fix"
}
}