{"_id":"@awesometypescript/react-context-modal","_rev":"1-3e86e57f8207f62b2fa3e705b85cb0d7","name":"@awesometypescript/react-context-modal","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@awesometypescript/react-context-modal","version":"1.0.0","description":"@awesometypescript/react-context-modal","author":{"name":"sander.vergeles"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/awesome-typescript/react-context-modal.git"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"npm run eslint && npm run prettier:lint && npm run test:jest","test:jest":"jest ./src --coverage","lint":"npm run eslint && npm run prettier:lint","eslint":"eslint ./src","prettier":"prettier --write ./src/**/**.ts","prettier:lint":"prettier --check ./src/**/**.ts","clean":"rimraf dist","build":"npm run clean && tsc --project tsconfig.json","commit":"npx git-cz","precommit":"lint-staged"},"publishConfig":{"access":"public"},"devDependencies":{"@commitlint/cli":"8.3.5","@commitlint/config-conventional":"8.3.4","@sanv/eslint-config-base":"2.0.1","@sanv/eslint-config-import":"2.0.1","@sanv/eslint-config-import-typescript":"2.0.3","@sanv/eslint-config-tests":"2.0.3","@sanv/eslint-config-tests-typescript":"2.0.3","@sanv/eslint-config-typescript":"2.1.1","@sanv/eslint-config-unicorn":"2.0.1","@sanv/eslint-config-unicorn-typescript":"2.0.3","@types/history":"4.7.9","@types/jest":"26.0.15","@types/node":"14.10.2","@types/react":"17.0.19","@types/react-dom":"17.0.9","@types/react-router-config":"5.0.3","@types/react-router-dom":"5.1.8","@typescript-eslint/eslint-plugin":"4.6.1","@typescript-eslint/parser":"4.6.1","cz-conventional-changelog":"3.0.2","eslint":"7.3.1","eslint-config-airbnb-base":"14.2.1","eslint-config-prettier":"6.15.0","eslint-import-resolver-typescript":"2.3.0","eslint-plugin-import":"2.22.1","eslint-plugin-jest":"24.1.0","eslint-plugin-prettier":"3.1.4","husky":"4.2.5","jest":"26.6.1","lint-staged":"10.2.2","prettier":"2.0.5","rimraf":"3.0.2","ts-jest":"26.4.2","typescript":"3.9.5"},"engines":{"node":">=8"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"eslintConfig":{"extends":"./.eslintrc.json"},"peerDependencies":{"react":">=15","react-dom":">=15","@types/react-dom":">=15"},"gitHead":"f320b219bf41e47b740674f900c6dcf9fdf6d150","bugs":{"url":"https://github.com/awesome-typescript/react-context-modal/issues"},"homepage":"https://github.com/awesome-typescript/react-context-modal#readme","_id":"@awesometypescript/react-context-modal@1.0.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-5FvACVLkKwLJ9dof0ucYUtxXE/Abfwb3JfALBpZXHQQJj0wdPSKmAQSDhCKP0HqubSmHMRX49LKP05pUs+dLFw==","shasum":"edbd6f523469204c55c2ee895ec24c49d40c77cd","tarball":"https://registry.npmjs.org/@awesometypescript/react-context-modal/-/react-context-modal-1.0.0.tgz","fileCount":4,"unpackedSize":4362,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdqxkw//j9d5imNtMB10yppiVSjWIYzMy8yUF+rc+AKQIhAM5bY6e8wyWJgXsHJ3K/WgkcSfY1O53GQmXz4v4TJpC3"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjn5AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpccA//Um19AqfO5qdIo6WvJNd5JmpcN9hG7b+oYTEkO1JAgucRJC2d\r\n7w//z3foeCpVLSxsCHeoJTdI8HjVcfSGL/2on0jm8gDkhTdm1nGPoOI8Ivh+\r\nJRfh+kqv/WVe4mZBAwO81LTIsJIYhYfzOum4d3tutQ/xQPswe3fPDVpPRtUf\r\nZawAUwZTx+jFFGjgTXLhZPotgji0mblBqK7lGmUvZcRbgJZB7Q/RKwrztfFT\r\nPV2TbnDVHsUoFcv6J3l/GRoAJZJnEOnLLguEXRnyHgwV2WaBt4dMxxvaAIXy\r\n93dSj5q1sqnhIKRxORCluA8Lwr9VsATGkysheQpLAyEH6h8aiXnx1tNP0WAM\r\ntkftCAB9ae4Q4OMYbxnWbJFF1L3Cc2J7Oz0fgwmpzydIJ4L4fLVYRXTapSi5\r\n/jkcvYW76kjfFVTOXXZP4ZV/9cUNvOBOPTtbW7FQ2kAM70sH/F0DepQuNXDn\r\naMGKljSsHbFWeip+nwwzlxbRb8RaVkz382smg37MGTCcU81/1B07PSbPemHO\r\nXQpJIj+qIp4TuTU1Ts2LzyD/qLcJvw9Y3qWaRV7tiJMMq5Aw6FE/GibCGFU9\r\n/BoaAzTX2+QRw/GL0XDg/UOuvjqHKlQK6mu2IKETBRI4T5l7KsSDUP4Wqk7P\r\nE9W3Ss1cOdLahq3/3MY7Dtqaum/XU/Jsiq0=\r\n=7Tpn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sv92","email":"sander.vergeles@gmail.com"},"directories":{},"maintainers":[{"name":"sv92","email":"sander.vergeles@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-context-modal_1.0.0_1670282816376_0.5894951701053663"},"_hasShrinkwrap":false},"1.0.1":{"name":"@awesometypescript/react-context-modal","version":"1.0.1","description":"@awesometypescript/react-context-modal","author":{"name":"sander.vergeles"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/awesome-typescript/react-context-modal.git"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"npm run eslint && npm run prettier:lint && npm run test:jest","test:jest":"jest ./src --coverage","lint":"npm run eslint && npm run prettier:lint","eslint":"eslint ./src","prettier":"prettier --write ./src/**/**.ts","prettier:lint":"prettier --check ./src/**/**.ts","clean":"rimraf dist","build":"npm run clean && tsc --project tsconfig.json","commit":"npx git-cz","precommit":"lint-staged"},"publishConfig":{"access":"public"},"devDependencies":{"@commitlint/cli":"8.3.5","@commitlint/config-conventional":"8.3.4","@sanv/eslint-config-base":"2.0.1","@sanv/eslint-config-import":"2.0.1","@sanv/eslint-config-import-typescript":"2.0.3","@sanv/eslint-config-tests":"2.0.3","@sanv/eslint-config-tests-typescript":"2.0.3","@sanv/eslint-config-typescript":"2.1.1","@sanv/eslint-config-unicorn":"2.0.1","@sanv/eslint-config-unicorn-typescript":"2.0.3","@types/history":"4.7.9","@types/jest":"26.0.15","@types/node":"14.10.2","@types/react":"17.0.19","@types/react-dom":"17.0.9","@types/react-router-config":"5.0.3","@types/react-router-dom":"5.1.8","@typescript-eslint/eslint-plugin":"4.6.1","@typescript-eslint/parser":"4.6.1","cz-conventional-changelog":"3.0.2","eslint":"7.3.1","eslint-config-airbnb-base":"14.2.1","eslint-config-prettier":"6.15.0","eslint-import-resolver-typescript":"2.3.0","eslint-plugin-import":"2.22.1","eslint-plugin-jest":"24.1.0","eslint-plugin-prettier":"3.1.4","husky":"4.2.5","jest":"26.6.1","lint-staged":"10.2.2","prettier":"2.0.5","rimraf":"3.0.2","ts-jest":"26.4.2","typescript":"3.9.5"},"engines":{"node":">=8"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"eslintConfig":{"extends":"./.eslintrc.json"},"peerDependencies":{"react":">=15","react-dom":">=15","@types/react-dom":">=15"},"gitHead":"a9d2824bcef2a1b143b897b55ab1e436f389b5ed","bugs":{"url":"https://github.com/awesome-typescript/react-context-modal/issues"},"homepage":"https://github.com/awesome-typescript/react-context-modal#readme","_id":"@awesometypescript/react-context-modal@1.0.1","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-+OiIwO7tKNgAKFBsx2R/KRMo0zbE+PF9HuHu4s3wsvUKM05dQSprwCw6YqphW5o/YrKHVnRr53qIlgrXN/wqlA==","shasum":"da6719fa4cdac0520e2c977a097c8ae347cd06f7","tarball":"https://registry.npmjs.org/@awesometypescript/react-context-modal/-/react-context-modal-1.0.1.tgz","fileCount":22,"unpackedSize":21608,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgwvw87ZhPfjhlur+ZIO+wPSvDrV4R1DMwXCRge5x+zAIhALuF22/GaDdX6nkGUawvCVWCUY4WR27aVihqtBa0hVS6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjoI1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlJQ/+PhsODLTejWbdCjLX9srJJ6DNyZ5EldGU6j+VZ8bjxR6FdXEb\r\nBfw8903Jp3YcauCXz0Zu8nruQWG3JNLzTvEjUYe5sQZmgeNL1gQC8AhWVszC\r\ntEA66698hcO0Hsp4QK6dUkaicxgE1dVHqGy2dW5LckMyFe8GMyTjWqi7d10o\r\n0LCT18lCi2hxwESQKj2UUB0kav94OmrOAHqRBN0KvTr2tOAVF6N3BR0ZvjVq\r\n7GoDuv+fI+PShKjD+TOmNhsErqbMNxb6fbJQ0CiTsj8vmYGigy+bubwv13y8\r\nFW2TqILOhc8ivnw+FWgifdfYOaDD4MNTbPrHpq4V1NEAp79cbBzl053siEps\r\n7L7IxprIxgkLO65jrooIKXq3Bkl5P99wXN0Gx+ZaeEtf+vsNMz/f9ZuotF9R\r\nKTpgeKniS6SOTIW0BQp341t7x30hOcRfnaxfJaAJE4eevlZJQe6sQ4by2GM5\r\n1MEGdpMdHpSpNS+QWapXgmC9wBzA71TqjJvGAV7jldE9xMjE+Pd1kIKNbYvZ\r\nZh+y9El2oxjDzSEnYMrlH2Oud7I1UafvpUJlwyTLq0FVW3nTXTVMRy8BAdlm\r\nibyYXCuXiz9LyOD0mDPheAPqFCGq29CTp2zuVqFjD++D/p08mx4snE5ISSEN\r\nRqVQChmdC1zhV3Yn4UW1HUBZ/MFkRT8wLPI=\r\n=+hyr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sv92","email":"sander.vergeles@gmail.com"},"directories":{},"maintainers":[{"name":"sv92","email":"sander.vergeles@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-context-modal_1.0.1_1670283829152_0.7721157944363426"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-05T23:26:56.303Z","1.0.0":"2022-12-05T23:26:56.545Z","modified":"2022-12-05T23:43:49.431Z","1.0.1":"2022-12-05T23:43:49.332Z"},"maintainers":[{"name":"sv92","email":"sander.vergeles@gmail.com"}],"description":"@awesometypescript/react-context-modal","homepage":"https://github.com/awesome-typescript/react-context-modal#readme","repository":{"type":"git","url":"git+https://github.com/awesome-typescript/react-context-modal.git"},"author":{"name":"sander.vergeles"},"bugs":{"url":"https://github.com/awesome-typescript/react-context-modal/issues"},"license":"ISC","readme":"# React Context Modal (working with multiple modals)\n\nWorking with multiple modals, you can use classes or Hooks depending on your own preference.\n\n### Install\n\n#### Create file .npmrc\n```\necho \"@awesome-typescript:registry=https://npm.pkg.github.com\" > .npmrc\n```\n\n#### Install npm package\n```\nnpm install @awesome-typescript/react-router-config-breadcrumbs@1.0.0 --save --save-exact\n```\n\n### Usage\n\nWith hooks:\n```tsx\nimport { useModalContext } from '@awesome-typescript/react-context-modal'\n\nconst ExamplePage = (props) => {\n    const { showModal } = useModalContext()\n\n    return (\n        <button onClick={() => showModal(ExampleModal, { userId: 1 })}>\n            Open modal\n        </button>\n    )\n}\n\nconst ExampleModal = ({ userId, ...props }) => (\n   <div>\n       <h1>User ID: {userId}</h1>\n       <button onClick={() => props.hideModal()}>\n           Hide Modal\n       </button>\n   </div>\n)\n```\n\n```tsx\nexport const App = () => (\n    <ModalProvider>\n        <App />\n        <ModalRoot />\n    </ModalProvider>\n)\n```\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n  </head>\n  <body>\n\t  <div id=\"root\"></div>\n\t  <div id=\"modal-root\"></div>\n  </body>\n</html>\n```\n","readmeFilename":"README.md"}