{"_id":"@aehrt55/antd-prompt","_rev":"1-6ea06f1e542779d82b46e47ac673a4dd","name":"@aehrt55/antd-prompt","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.1":{"name":"@aehrt55/antd-prompt","version":"0.2.1","description":"An ant.design helper that auto create a Modal with an optional message prompting the user to input some text.","main":"lib/index.js","module":"esm/index.js","scripts":{"build":"rm -rf esm && rm -rf lib && npm run build:esm && npm run build:commonjs","build:commonjs":"cross-env BABEL_OUTPUT=commonjs babel src --out-dir lib/ --ignore **/__tests__,**/__mocks__","build:esm":"babel src --out-dir esm/ --ignore **/__tests__,**/__mocks__","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/wangsijie/antd-prompt.git"},"keywords":["antd","ant-design","prompt","modal"],"author":{"name":"Wang Sijie","url":"i@sijie.wang"},"license":"ISC","bugs":{"url":"https://github.com/wangsijie/antd-prompt/issues"},"homepage":"https://github.com/wangsijie/antd-prompt#readme","devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","cross-env":"^5.2.0"},"gitHead":"12f5fb46afd3da71357e8e02d03a0191a57aeab9","_id":"@aehrt55/antd-prompt@0.2.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"aehrt55","email":"aehrt55@aehrt55.net"},"dist":{"integrity":"sha512-hHiAuBaE9PjLOTwHXAQTIOYKt20DvHhCgF3Tch3xbjHbbhIsMkwtGE23C9/nJWddClIZgDSeXP/NCLOIAHCpYA==","shasum":"30033f6bcca693908bbdea048bca453da7c4a72e","tarball":"https://registry.npmjs.org/@aehrt55/antd-prompt/-/antd-prompt-0.2.1.tgz","fileCount":6,"unpackedSize":13002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1sAhCRA9TVsSAnZWagAAXZsP/2WT4HJrM/FVRRnyrZMD\nIgDvV5qSCOf73VH8eTsyonVoOzt0jeyXHRrWQMcWCMv3tgKrxGOZllMhPORA\nJ/V/0PU+VHgLFmSGLg19Ov2MlOYo7A0ngWDx9M2UOeIhVCkNgb/k7d335byW\nb7TB9MdEE6BxVkuDkDJJw2P37mJ54LYeEpLkQcwpDLR34yWwi4M3nf/srjBh\nbY/UQSdb4ZxCFz1EiuOyvATmuGOEdXDD/LUbOAZzPnCuvL3xulA/Dp3ZSf+y\np9MD3dTvJQQX9JRixwIMmRIbqHy45B/3uB0KmTEb35HiwTtpAYMFClm5i1TH\nP4b1L8jLb7DQttmVnT/GNoMh3oNXyxwVkyawB77Ap91nkLCOYBES4r5u3CBu\nxkjVyNNsdt7Jz2cfBokbkGCeL7Gh+4y+jXneFqDtsxxBJnN6N+GlzF/tCT4r\nP9Cp+vPM9KavIC5RDn5qoZFoVfIsiXkV1N0atrzvLjt3qO8K1ME734oL0SOk\nfsmHF+Rs0RvTf5k77unfNTK+ZmXzbLD6IZuK4HQLvT6RTyC+o0KKCoYJPITU\nt0TxbUDjLLQYg/TuqL1sod1bD8UbyPX5ekeAIHJmUUQgZkMrcHRrbqOzFSmm\nwu/vRq7CgjA5ubNwqx/Sv+UqQiEwnPDiOL1xY5zc66lNUP2OZurOD0XCSPzE\nWLvJ\r\n=CJhE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC8M88gPrhaYBx9hz+Qvubul7RfTUVIAE2ZlsqcvDhTgAiBJyhwJQBdNgJboAzpBlRXspCoUxoWlNAnEdU0jTF5Y5g=="}]},"maintainers":[{"name":"aehrt55","email":"aehrt55@aehrt55.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/antd-prompt_0.2.1_1574354976712_0.6284342903610869"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-21T16:49:36.473Z","0.2.1":"2019-11-21T16:49:36.832Z","modified":"2022-04-04T11:47:22.335Z"},"maintainers":[{"name":"aehrt55","email":"aehrt55@aehrt55.net"}],"description":"An ant.design helper that auto create a Modal with an optional message prompting the user to input some text.","homepage":"https://github.com/wangsijie/antd-prompt#readme","keywords":["antd","ant-design","prompt","modal"],"repository":{"type":"git","url":"git+https://github.com/wangsijie/antd-prompt.git"},"author":{"name":"Wang Sijie","url":"i@sijie.wang"},"bugs":{"url":"https://github.com/wangsijie/antd-prompt/issues"},"license":"ISC","readme":"# antd-prompt\n\nAn ant.design helper that auto create a Modal with an optional message prompting the user to input some text.\n\n## Installation\n\n```sh\nnpm i antd-prompt\n```\n\n## Usage\n\n[![Edit antd-prompt](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/antd-prompt-fohcs?fontsize=14)\n\n```js\nimport React, { component } from 'react';\nimport ReactDOM from 'react-dom';\nimport prompt from 'antd-prompt';\nimport { Button, message } from 'antd';\n\nclass App extends Component {\n    handler = async () => {\n        try {\n            const name = await prompt({\n                title: \"Please enter name\",\n                placeholder: \"Your name\",\n                rules: [\n                    // check this link for more help: https://ant.design/components/form/#Validation-Rules\n                    {\n                        required: true,\n                        message: \"You must enter name\"\n                    }\n                ],\n                modalProps: {\n                    width: '80%'\n                }\n            });\n        } catch (e) {\n            message.error('Please enter name');\n        }\n    }\n    render() {\n        return <div>\n            <Button onClick={this.handler}>Set Name</Button>\n        </div>\n    }\n}\n\nReactDOM.render(<App />, document.getElementById('root'));\n```\n","readmeFilename":"README.md"}