Socket
Socket
Sign inDemoInstall

rmc-notification

Package Overview
Dependencies
19
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rmc-notification

notification ui component for react


Version published
Weekly downloads
16K
decreased by-0.21%
Maintainers
0
Install size
3.23 MB
Created
Weekly downloads
 

Readme

Source

rmc-notification


React Notification UI Component

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

Development

npm install
npm start

Example

http://localhost:8000/examples/

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

Feature

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

install

rmc-notification

Usage

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

API

Notification.newInstance(props, (notification) => void) => void

props details:

nametypedefaultdescription
prefixClsStringprefix class name for notification container
styleObject{'top': 65, left: '50%'}additional style for notification container.
getContainergetContainer(): HTMLElementfunction returning html node which will act as notification container

notification.notice(props)

props details:

nametypedefaultdescription
contentReact.Elementcontent of notice
keyStringid of this notice
closableBooleanwhether show close button
onCloseFunctioncalled when notice close
durationnumber1.5after duration of time, this notice will disappear.(seconds)
styleObject { right: '50%' } additional style for single notice node.

notification.removeNotice(key:string)

remove single notice with specified key

notification.destroy()

destroy current notification

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rmc-notification is released under the MIT license.

Keywords

FAQs

Last updated on 29 Nov 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc