ractive-ez-notifications
v2.0.4
Published
Ractive Ez UI Notifications
Downloads
3
Maintainers
Readme
Ractive Ez Notifications
Notifications for ractive.js
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);