3.0.2 • Published 4 years ago
@app-elements/notification v3.0.2
Notification
Displays a notification message.
Installation
npm install --save @app-elements/notification
Usage
import Notification, { showNotification } from '@app-elements/notification'
// Place in your root App component. Should only be rendered once in your DOM tree.
<Notification />
// To show a notification
showNotification({ message: 'PIRATES!' })
showNotification
options
Prop | Type | Default | Description |
---|---|---|---|
message | String | None | The text to display in the notification |
type | Enum | 'error' | The class to use for the notication style. One of: [ 'error', 'warning', 'success' ] |
length | Number | 3000 | Time to keep the message displayed in milliseconds |