New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-material-notification

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-material-notification

Package for displaying material-style notifications in your react app, built with flux architecture.

latest
npmnpm
Version
1.3.4
Version published
Maintainers
1
Created
Source

npm-material-notification

This is a package to show material-ui styled notification in your react project.

To use it:

  • require the package
var N = require('react-material-notification');

  • render it in your master component
...
render: function() {
	return <div>
				<N.Component />
			</div>
}
...
  • wherever you want to add a notification, that should be displayed, call the function N.Add() and pass in the string or an array of strings that you want to display.
...
	N.Add(['This is one notifications', 'This is another one']);
or
	N.Add("I am a notification");

You can now also set the time after which the notifications will automatically dismissed by passing a property to the master component like so. Time is in ms by the way.

render: function() {
	return <div>
				<N.Component dismissAfter={12000} />
			</div>
}

and that's about it :) Every notification will have a dismiss button that will hide it. Enjoy

Keywords

react

FAQs

Package last updated on 26 Apr 2019

Did you know?

Socket

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