3.1.0 • Published 1 year ago
@bast1oncz/notifications v3.1.0
@BastSys/Notifications
Installation
Requirements
This package uses @material-ui as a peer dependency.
npm i @bast1oncz/notifications @material-ui/core @material-ui/icons -S
Usage
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!')
...