2.0.4 • Published 6 years ago

ractive-ez-notifications v2.0.4

Weekly downloads
2
License
WTFPL
Repository
github
Last release
6 years ago

Ractive Ez Notifications

Notifications for ractive.js

Demo

Install

npm i ractive-ez-notifications
import EzNotifications from 'ractive-ez-notifications';
import                      'ractive-ez-notifications/themes/blue.less';

Theming requires less-loader.

Usage

import EzNotifications from 'ractive-ez-notifications';
import MyRactiveComponent from './MyRactiveComponent.js';

EzNotifications.notify(MyRactiveComponent, {
    area: "top-right",
    duration: 5000,
    data: {}
});

Options:

  • area: Position to dock the message. Possible options: top-left, top-right, bottom-left, bottom-right
  • duration: Time (in ms) after which the message is removed. Use 0 to leave the message up permanently.
  • data: Object. Each key is passed to the component when instantiated.

Simple Notifications

Shortcuts to create simple color-coded messages

EzNotifications.alert(title, message, options);
EzNotifications.info(title, message, options);
EzNotifications.error(title, message, options);
EzNotifications.success(title, message, options);
2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

0.9.3

7 years ago