universal-toast
v0.4.4title: toast
universal-toast
Universal toast, you can choose how many seconds after disappearing
Support
Install
$ npm install universal-toast --save
Usage
import Toast from 'universal-toast';
Toast.show('Hi');
Methods
Toast.show(options: object | string)
Arguments
Property | Type | Description | Default |
---|---|---|---|
message | string |
content of the message | - |
type | `success | fail | none` |
duration | number |
Time in millisecond before Toast is closed. | 2000 |
success | function |
The callback function for a successful API call | - |
fail | function |
The callback function for a failed API call | - |
complete | function |
The callback function used when the API call completed (always executed whether the call succeeds or fails) | - |
Toast.hide()
Hides the loading prompt box
npm i [email protected]
Metadata
- BSD-3-Clause
- Whatever
- Unknown
- released 7/14/2017