1.3.0 • Published 6 years ago

simple-notification v1.3.0

Weekly downloads
9
License
ISC
Repository
github
Last release
6 years ago

Simple Notification

NPM version

Demo

See demo here: Demo

Installation

To install this library, run:

$ npm i simple-notification --save

Copy the content of dist folder app.js and app.css or use other tools how gulp

Or use a CDN option

Dependencies

This library needs the JQuery.

FontAwesome is not required, only if you like using icons.

Methods and options

Available methods

simpleNotify.basic("message", "title", options)
simpleNotify.info("message", "title", options)
simpleNotify.danger("message", "title", options)
simpleNotify.success("message", "title", options)
simpleNotify.warning("message", "title", options)

Default options

var options = {
  type: '',
  title: '',
  content: '',
  lifetime: 5000,
  sticky: false,
  closeTrigger: true,
  iconCls: '',
};
PropDescription
typesuccess, info, warning, danger.
titleThe title of notification.
contentThe content of notification.
lifetimeThe time in milliseconds to destroy the notification.
stickyIf true the notification won't be destroyed automatically.
closeTriggerIf false the close button won't be displayed.
iconClsRepresent the icon class of FontAwesome. For Example 'envelope', it isn't necessary to give the full name like 'fa fa-envelope'.

Development

To compile run:

$ gulp default

To serve local run:

$ npm run dev

License

ISC © Walter Ribeiro

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago