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 = ;
- render it in your master component
... { return <div> <NComponent /> </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;or N;
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.
{ return <div> <NComponent dismissAfter=12000 /> </div>}
and that's about it :) Every notification will have a dismiss button that will hide it. Enjoy