{"_id":"@allmanaj/react-confirm-alert","_rev":"1-530e1e00f2ff4eae6eea111871f0aecd","name":"@allmanaj/react-confirm-alert","dist-tags":{"latest":"2.4.1"},"versions":{"2.4.1":{"name":"@allmanaj/react-confirm-alert","version":"2.4.1","description":"react component confirm dialog.","main":"lib/index.js","scripts":{"dev":"cross-env NODE_ENV=development webpack-dev-server --hot --inline","test":"npm run lint && mocha ./test/**/*.test.js --compilers js:babel-register","test:watch":"mocha ./test/**/*.test.js --compilers js:babel-register --watch","lint":"eslint ./src","clean":"rimraf lib","build":"npm run clean && cross-env NODE_ENV=production babel src --out-dir lib && npm run build:demo","build:demo":"cross-env NODE_ENV=production webpack --config webpack.config.production.js","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/GA-MO/react-confirm-alert.git"},"keywords":["react alert example","redux confirm dialog","confirm alert react js","react-confirm-alert","react-confirm","confirm-dialog","confirm","dialog","react"],"author":{"name":"Thawatchai Kuansombat","url":"thawatchai.deartk@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/GA-MO/react-confirm-alert/issues"},"homepage":"https://github.com/GA-MO/react-confirm-alert","typings":"./index.d.ts","devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.2","babel-plugin-transform-decorators-legacy":"^1.3.4","babel-polyfill":"^6.26.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-0":"^6.24.1","chai":"^4.1.2","cross-env":"^5.2.0","css-loader":"^0.28.7","eslint":"^4.5.0","eslint-config-standard":"^10.2.1","eslint-config-standard-react":"^5.0.0","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.1","eslint-plugin-promise":"^3.5.0","eslint-plugin-react":"^7.3.0","eslint-plugin-standard":"^3.0.1","mocha":"^3.5.0","prop-types":"^15.6.2","react":"^16.4.1","react-dom":"^16.4.1","react-hot-loader":"^4.3.3","rimraf":"^2.6.1","style-loader":"^0.18.2","url-loader":"^0.5.9","webpack":"^3.5.5","webpack-dev-server":"^2.7.1"},"peerDependencies":{"react":">=16.0.0","react-dom":">=16.0.0"},"gitHead":"7fe4cb3f8707315b8281fc7d4e8796ffb96cc8d6","_id":"@allmanaj/react-confirm-alert@2.4.1","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"allmanaj","email":"angus.allman@gmail.com"},"dist":{"integrity":"sha512-0WAUfmISaPGkCUCVoKjFrDOR2Xxb8rGPuR3X0FOqIHD+6Dl+ouAK0JcGT838JIaCccpvyc0vvTkU7VvdwqRITg==","shasum":"eacbac8d14c188826d5f8e93f5b1ce8f0c0066ee","tarball":"https://registry.npmjs.org/@allmanaj/react-confirm-alert/-/react-confirm-alert-2.4.1.tgz","fileCount":6,"unpackedSize":17808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcysSxCRA9TVsSAnZWagAAsy0P/0uxlGVhbfi3lHR7+6f4\n5INuchWiha6TsttHnBdPzaoepk6YDrauZuiD6NP/l4cI6gozB5XLjtGBqJTn\n0t59lLjrvckLfYqudGr85t1fWNcySHW3kY3WZdiX/W2hMKk4nzhw/nmNrIC3\npSuxkOfNFF9gPYbovknJRtO1nW4zTVTvozHHVBwIRVvBAd9vWDBqtdnx85z0\nmupf6iSQDjwC9/4Hfm9N6L/ixaHmmFFN1yScjYvq+InnckxHm6ak+FhQ3y20\n2W5y4PWdU8KUk/kWGevN7ZwLxLJdQKCyLkebL1J3K7n9z58oCujuJPlz2tNp\nqTkimrNfQx5DqV97AQenBnT5YADsL/5NP0LK/JQ94WcmhN931fjpYAz/VcjI\n8R+cBctkEtxoFNZWZwU/i9eR6QvaKYU215uGA0sg/6U3g9My2P6lackM+WrY\nyQuGbluvhqtRBONCMGnnvLULV+GA3U7ltxX1c6KrqaeqhSsnHa+KY3R5peYR\n8p5iHXYuZqjPZ67SMItSP5y/4hqb2IUvvgxmn7Rv5QGuHGpQWKCkynXkAs8J\nIz7+9Zjd+g97yIQNkx0zXwggQpyiPiYayU5+mwGmW4O1uUbmvHLFnCmTSkWa\ngtu8rZ6yTMSpYQUsLKG/Q6NsGhrNHoNFmE/7FgQzgzbUGfvbeQoDsrzlQvCP\nEi37\r\n=Id9v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDPT3b2YFLAAkpeFdsa80Ztd+exLpa6BFMeAbUlWcbCUAiBAjwUz8ZVwhFj9vzRtfD34qxITFaxS19z3Su2rchV2jA=="}]},"maintainers":[{"name":"allmanaj","email":"angus.allman@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-confirm-alert_2.4.1_1556792497113_0.8063923539346183"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-02T10:21:37.086Z","2.4.1":"2019-05-02T10:21:37.229Z","modified":"2022-04-04T13:33:23.350Z"},"maintainers":[{"name":"allmanaj","email":"angus.allman@gmail.com"}],"description":"react component confirm dialog.","homepage":"https://github.com/GA-MO/react-confirm-alert","keywords":["react alert example","redux confirm dialog","confirm alert react js","react-confirm-alert","react-confirm","confirm-dialog","confirm","dialog","react"],"repository":{"type":"git","url":"git+https://github.com/GA-MO/react-confirm-alert.git"},"author":{"name":"Thawatchai Kuansombat","url":"thawatchai.deartk@gmail.com"},"bugs":{"url":"https://github.com/GA-MO/react-confirm-alert/issues"},"license":"MIT","readme":"# react-confirm-alert\n\nreact component confirm dialog. [Live demo](https://ga-mo.github.io/react-confirm-alert/demo/)\n\n[![npm version](https://badge.fury.io/js/react-confirm-alert.svg)](https://badge.fury.io/js/react-confirm-alert)\n\nDocument for v.1.x.x [see](https://github.com/GA-MO/react-confirm-alert/blob/master/Document-v1.md)\n\n## Getting started\n\n#### Install with NPM:\n\n```\n$ npm install react-confirm-alert --save\n```\n\n#### Options\n\n```jsx\nconst options = {\n  title: 'Title',\n  message: 'Message',\n  buttons: [\n    {\n      label: 'Yes',\n      onClick: () => alert('Click Yes')\n    },\n    {\n      label: 'No',\n      onClick: () => alert('Click No')\n    }\n  ],\n  childrenElement: () => <div />,\n  customUI: ({ onClose }) => <div>Custom UI</div>,\n  closeOnEscape: true,\n  closeOnClickOutside: true,\n  willUnmount: () => {},\n  onClickOutside: () => {},\n  onKeypressEscape: () => {}\n};\n\nconfirmAlert(options);\n```\n\n#### Use with function:\n\n```jsx\nimport { confirmAlert } from 'react-confirm-alert'; // Import\nimport 'react-confirm-alert/src/react-confirm-alert.css'; // Import css\n\nclass App extends React.Component {\n  submit = () => {\n    confirmAlert({\n      title: 'Confirm to submit',\n      message: 'Are you sure to do this.',\n      buttons: [\n        {\n          label: 'Yes',\n          onClick: () => alert('Click Yes')\n        },\n        {\n          label: 'No',\n          onClick: () => alert('Click No')\n        }\n      ]\n    });\n  };\n\n  render() {\n    return (\n      <div className='container'>\n        <button onClick={this.submit}>Confirm dialog</button>\n      </div>\n    );\n  }\n}\n```\n\n#### Custom UI Component\n\n```js\nconfirmAlert({\n  customUI: ({ onClose }) => {\n    return (\n      <div className='custom-ui'>\n        <h1>Are you sure?</h1>\n        <p>You want to delete this file?</p>\n        <button onClick={onClose}>No</button>\n        <button\n          onClick={() => {\n            this.handleClickDelete();\n            onClose();\n          }}\n        >\n          Yes, Delete it!\n        </button>\n      </div>\n    );\n  }\n});\n```\n","readmeFilename":"Readme.md"}