{"_id":"rmc-notification","_rev":"2838134","name":"rmc-notification","description":"notification ui component for react","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"warmhug","email":"hualei5280@gmail.com"},{"name":"zhang740","email":"zhang740@vmzclub.com"}],"time":{"modified":"2022-09-06T15:43:35.000Z","created":"2017-11-29T09:53:11.475Z","1.0.0":"2017-11-29T09:53:11.475Z"},"users":{},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/m-notification.git"},"versions":{"1.0.0":{"name":"rmc-notification","version":"1.0.0","description":"notification ui component for react","keywords":["react","react-component","react-notification","notification"],"homepage":"http://github.com/react-component/notification","maintainers":[{"name":"warmhug","email":"hualei5280@gmail.com"},{"name":"zhang740","email":"zhang740@vmzclub.com"}],"files":["dist","lib","es","assets/*.css"],"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/m-notification.git"},"bugs":{"url":"http://github.com/react-component/m-notification/issues"},"licenses":"MIT","main":"lib/index","module":"es/index","config":{"port":8000,"entry":{"rmc-notification":["./assets/index.less","./src/index.js"]}},"scripts":{"build":"rc-tools run build","gh-pages":"rc-tools run gh-pages","start":"rc-tools run server","compile":"rc-tools run compile --babel-runtime","pub":"rc-tools run pub --babel-runtime","lint":"rc-tools run lint","karma":"rc-test run karma","saucelabs":"rc-test run saucelabs","test":"rc-test run test","chrome-test":"rc-test run chrome-test","coverage":"rc-test run coverage"},"devDependencies":{"core-js":"^2.5.1","expect.js":"~0.3.1","pre-commit":"1.x","rc-test":"^6.0.8","rc-tools":"^6.3.6","react":"^16.0.0","react-dom":"^16.0.0"},"precommit":["lint"],"dependencies":{"babel-runtime":"6.x","classnames":"2.x","prop-types":"^15.5.8","rc-animate":"2.x","rc-util":"^4.0.4"},"pre-commit":["lint"],"gitHead":"06af91171d630a26568788c13aad93649b82a5b5","_id":"rmc-notification@1.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"zhang740","email":"zhang740@vmzclub.com"},"dist":{"shasum":"1fcee98f99b9733f7ce63a91d7663a578743d075","size":87604,"noattachment":false,"key":"/rmc-notification/-/rmc-notification-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rmc-notification/download/rmc-notification-1.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rmc-notification-1.0.0.tgz_1511949191395_0.13240587012842298"},"directories":{},"publish_time":1511949191475,"_hasShrinkwrap":false,"_cnpm_publish_time":1511949191475,"_cnpmcore_publish_time":"2021-12-16T12:33:51.759Z"}},"readme":"# rmc-notification\n---\n\nReact Notification UI Component\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![gemnasium deps][gemnasium-image]][gemnasium-url]\n[![node version][node-image]][node-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/rmc-notification.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rmc-notification\n[travis-image]: https://img.shields.io/travis/react-component/m-notification.svg?style=flat-square\n[travis-url]: https://travis-ci.org/react-component/m-notification\n[coveralls-image]: https://img.shields.io/coveralls/react-component/m-notification.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/m-notification?branch=master\n[gemnasium-image]: http://img.shields.io/gemnasium/react-component/m-notification.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/react-component/m-notification\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[download-image]: https://img.shields.io/npm/dm/rmc-notification.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rmc-notification\n\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:8000/examples/\n\nonline example: http://react-component.github.io/m-notification/examples/\n\n\n## Feature\n\n* support ie8,ie8+,chrome,firefox,safari\n\n\n## install\n\n[![rmc-notification](https://nodei.co/npm/rmc-notification.png)](https://npmjs.org/package/rmc-notification)\n\n## Usage\n\n```js\nvar Notification = require('rmc-notification');\nNotification.newInstance({}, notification => {\n  notification.notice({\n    content: 'content'\n  });\n});\n```\n\n## API\n\n### Notification.newInstance(props, (notification) => void) => void\n\nprops details:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>prefixCls</td>\n          <td>String</td>\n          <td></td>\n          <td>prefix class name for notification container</td>\n        </tr>\n        <tr>\n          <td>style</td>\n          <td>Object</td>\n          <td>{'top': 65, left: '50%'}</td>\n          <td>additional style for notification container.</td>\n        </tr>\n        <tr>\n          <td>getContainer</td>\n          <td>getContainer(): HTMLElement</td>\n          <td></td>\n          <td>function returning html node which will act as notification container</td>\n        </tr>\n    </tbody>\n</table>\n\n### notification.notice(props)\n\nprops details:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>content</td>\n          <td>React.Element</td>\n          <td></td>\n          <td>content of notice</td>\n        </tr>\n        <tr>\n          <td>key</td>\n          <td>String</td>\n          <td></td>\n          <td>id of this notice</td>\n        </tr>\n        <tr>\n          <td>closable</td>\n          <td>Boolean</td>\n          <td></td>\n          <td>whether show close button</td>\n        </tr>\n        <tr>\n          <td>onClose</td>\n          <td>Function</td>\n          <td></td>\n          <td>called when notice close</td>\n        </tr>\n        <tr>\n          <td>duration</td>\n          <td>number</td>\n          <td>1.5</td>\n          <td>after duration of time, this notice will disappear.(seconds)</td>\n        </tr>\n        <tr>\n          <td>style</td>\n          <td>Object</td>\n          <td> { right: '50%' } </td>\n          <td>additional style for single notice node.</td>\n        </tr>\n    </tbody>\n</table>\n\n### notification.removeNotice(key:string)\n\nremove single notice with specified key\n\n### notification.destroy()\n\ndestroy current notification\n\n## Test Case\n\n```\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\nopen coverage/ dir\n\n## License\n\nrmc-notification is released under the MIT license.\n","_attachments":{},"homepage":"http://github.com/react-component/notification","bugs":{"url":"http://github.com/react-component/m-notification/issues"}}