derby-ui-toast
Notification messages (toasts for Derby.
Requirements
Installation
Using npm
npm install derby-ui-toast
Usage
First you have to import the base CSS:
If you want to use the default background images on the notification boxes:
Or if you want to use the Font Awesome icons:
Also you have to enable the component in JavaScript:
app;
And in HTML:
Adding messages
model;
type : string, the default possibilities are:
- 'info'
- 'success'
- 'warning'
- 'error'
message: string
options: object
options
- sticky
default: false - timeout
default: 5000 - click
default: none
Examples:
model;model;model;model;model;model;
Removing messages
Messages will disappear in 5 seconds by default. They can also be removed by clicking the message dialog box.
Beware
The namespace derby-ui-toast
will be changed later to ui
.