Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

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