2.0.4 • Published 8 years ago
ractive-ez-notifications v2.0.4
Ractive Ez Notifications
Notifications for ractive.js
Install
npm i ractive-ez-notificationsimport 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-rightduration: 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);