0.1.7 • Published 6 years ago

unnotify v0.1.7

Weekly downloads
34
License
SEE LICENSE IN LI...
Repository
github
Last release
6 years ago

unnotify

Project has migrated to @unaxiom/unnotify. This package is only for legacy purposes.

Pure JS growlish notifications with zero dependencies, simple API written in TypeScript. No jQuery needed either.

Installation

user@username ~> npm install unnotify --save
  • If integrating using browserify:

In your typescript files, import as:

import * as unnotify from 'unnotify';
  • If integrating to webpage:
<script src="dist/unnotify.min.js" type="text/javascript"></script>

Usage

// Initialization is required just once across all the files.
unnotify.init();

// To display a notification
var notificationID = unnotify.show('This is the Title', 'This is the content', {
    type: 'success' | 'info' | 'warning' | 'danger' | 'custom',
    timeout: 5000, // Number of milliseconds for which this notification needs to be displayed. If value is 0, then it won't be automatically destroyed.
    customClass: '', // (**Optional**) Name of the custom class that will be used instead of builtin classes. For this to be used, **type** should be set to 'custom'. 
    animateIn: 'lightSpeedIn', // (**Optional**) Name of the animation class (from animate.css) that needs to be used while creating the notification.
    animateOut: 'bounceOut', // (**Optional**) Name of the animation class (from animate.css) that needs to be used while destroying the notification.
})

// To close the notification programatically
unnotify.destroy(notificationID);

Dev

user@username ~> npm install
user@username ~> gulp

Make necessary code changes in unnotify.ts

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago