apeman-service-toast
Service for toasts.
Installation
$ npm install apeman-service-toast --save
Usage
#!/usr/bin/env node 'use strict' const ApToastService = const createStore = const reducer = const co =
API
apeman-service-toast@2.0.0
Service for toasts.
- Functions
- ApToastService Class
Functions
ApToastService
create(args) -> Create the service instance
Param | Type | Description |
---|---|---|
args | * |
ApToastService Class
Service
new ApToastService(store, options)
Constructor of ApToastService class
Param | Type | Description |
---|---|---|
store | Object | Redux store |
options | Object | Optional settings |
Array.<string>
service.getToasts(level) -> Get toast
Param | Type | Description |
---|---|---|
level | string | Toast level |
Promise
service.toast(level, text) -> Show toast
Param | Type | Description |
---|---|---|
level | string | Toast level |
text | string | Toast text |
Promise
service.infoToast(text) -> Show info toast
Param | Type | Description |
---|---|---|
text |
Promise
service.warnToast(text) -> Show warn toast
Param | Type | Description |
---|---|---|
text |
Promise
service.errorToast(text) -> Show error toast
Param | Type | Description |
---|---|---|
text |
License
This software is released under the MIT License.