@bast1oncz/notifications
v3.1.0
Published
Notifications for react app
Readme
@BastSys/Notifications
Installation
Requirements
This package uses @material-ui as a peer dependency.
npm i @bast1oncz/notifications @material-ui/core @material-ui/icons -SUsage
1. Render <NotificationProvider /> anywhere in your react tree.
import {NotificationProvider} from '@bast1oncz/notifications/dist'
<NotificationProvider>
<App />
</NotificationProvider>2. Import a show message function and use them wherever in your application.
Note: To use any of these functions, the <NotificationProvider /> must be already rendered!
import {
showSuccess,
showError,
showWarning,
showInfo
} from '@bast1oncz/notifications/dist'
...
showSuccess('Hello world!')
...