Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wheelo/popup
Proof-of-concept of a popup using ES2015
https://github.com/wheelo/popup
notifier toastr tooltip
Last synced: 10 days ago
JSON representation
Proof-of-concept of a popup using ES2015
- Host: GitHub
- URL: https://github.com/wheelo/popup
- Owner: wheelo
- Created: 2017-03-18T06:17:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-18T09:55:51.000Z (over 7 years ago)
- Last Synced: 2024-11-06T21:44:22.301Z (about 2 months ago)
- Topics: notifier, toastr, tooltip
- Language: JavaScript
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 25
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# popup
Proof-of-concept of a popup using ES2015## Description
There are four modes in this popup plugin: Loading, State(success/fail), Verify(one verify button), Confirm(verify and cancel).Mainly for Proof-of-concept, If you wanna use it, please use it with babel & less compliler
## Usage
```
// 1. loading
var loadToastr = Popup.Loading();
loadToastr.open();
loadToastr.close();// 2.State
var stateToastr = Popup.State('Success');
stateToastr.open(1500, 'slow');// 3. Verify
var veirfyToastr = Popup.Verify({
dec: 'Desc 1',
callback() {
console.log('callback when clicking confirm')
// veirfyToastr.close();
}
});
veirfyToastr.open();// 4. Confirm
var confirmToastr = Popup.Confirm({
dec: 'Desc2',
callback() {
console.log('callback when clicking confirm')
}
});
confirmToastr.open();
```