Author: | finnp |
---|---|
Views Total: | 585 views |
Official Page: | Go to website |
Last Update: | August 30, 2018 |
License: | MIT |
Preview:

Description:
dom-notifications is a notification bar component which lets you create and display Atom-style stackable info/success/warning/error notification messages on the screen.
How to use it:
Create a bundle for the browser browserify or install the component via NPM.
npm install dom-notifications --save
Include the Octicons icon font for the notification icons.
<link rel="stylesheet" href="/path/to/octicons.min.css">
Initialize the dom-notifications.
var domNotifications = require('dom-notifications') var notifications = domNotifications(options) document.body.appendChild(notifications.element())
Create a default info notification bar:
notifications.add({message: 'Info message'})
Create a warning notification bar:
- type: info, warning, error or success
notifications.add({message: 'Warning Message', type: 'warning'}) // or notifications.warning('Warning Message')
Customize the icon classes.
{ // options icons: { error: 'octicon octicon-flame', warning: 'octicon octicon-alert', info: 'octicon octicon-info', success: 'octicon octicon-check', close: 'octicon octicon-x' }
Changelog:
08/30/2018
- Update