A simple toast.
Toos pronouses the same as Chinese word 「吐司」.
Using command line:
$ yarn add toos
# or
$ npm i -S toos
Using CDN:
<script src="//unpkg.com/toos/dist/toos.umd.js"></script>
import toos from 'toos';
toos.show('Allo!');
toos.show('Allo!', {
style: 'color:red;'
});
show: (message: string | number, options: ToastOptions) => void
: show the toastmessage
: the message to show- type:
string
- default: N/A
- type:
options
: use the option object to custumize the toaststyle
: style for the toast- type:
string
- default:
- type:
class
: class name to customize the style- type:
string
- default:
- type:
duration?: number
: toast duration in ms- type:
number
- default:
300
- type:
See the stories for examples