JSPM

  • Created
  • Published
  • Downloads 1707235
  • Score
    100M100P100Q197154F

notification ui component for react

Package Exports

  • rc-notification
  • rc-notification/assets/index.css

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-notification) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rc-notification


notification ui component for react.

NPM version build status Test coverage gemnasium deps node version npm download Sauce Test Status

Sauce Test Status

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example: http://react-component.github.io/notification/examples/

Feature

  • support ie8,ie8+,chrome,firefox,safari

install

rc-notification

Usage

var Notification = require('rc-notification');
var notification = Notification.newInstance();
notification.notice({
  content: 'content'
});

API

Notification.newInstance(props)

props details:

name type default description
prefixCls String prefix class name for notification container
style Object {'top': 65, left: '50%'} additional style for notification container.

notification.notice(props)

props details:

name type default description
content React.Element content of notice
key String id of this notice
closable Boolean whether show close button
onClose Function called when notice close
duration number 1.5 after duration of time, this notice will disappear.(seconds)
style Object {right: '50%'} additional style for single notice node.

notification.destroy()

destroy current notification

Test Case

http://localhost:8000/tests/runner.html?coverage

Coverage

http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage

License

rc-notification is released under the MIT license.