Created
September 19, 2017 14:12
-
-
Save uno-de-piera/c2daec85786bdbd89a6a1dc3a47d33e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VueNotifications from 'vue-notifications'; | |
import miniToastr from 'mini-toastr'; | |
window.Vue.use(BlockUI); | |
const toastTypes = { | |
success: 'success', | |
error: 'error', | |
info: 'info', | |
warn: 'warn' | |
}; | |
miniToastr.init({types: toastTypes}); | |
function toast ({title, message, type, timeout, cb}) { | |
return miniToastr[type](message, title, timeout, cb) | |
} | |
const options = { | |
success: toast, | |
error: toast, | |
info: toast, | |
warn: toast | |
}; | |
window.Vue.use(VueNotifications, options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment