Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 925 Bytes

File metadata and controls

27 lines (18 loc) · 925 Bytes

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