Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import VueNotifications from 'vue-notifications';
  2. import miniToastr from 'mini-toastr';
  3.  
  4. window.Vue.use(BlockUI);
  5.  
  6. const toastTypes = {
  7. success: 'success',
  8. error: 'error',
  9. info: 'info',
  10. warn: 'warn'
  11. };
  12.  
  13. miniToastr.init({types: toastTypes});
  14.  
  15. function toast ({title, message, type, timeout, cb}) {
  16. return miniToastr[type](message, title, timeout, cb)
  17. }
  18.  
  19. const options = {
  20. success: toast,
  21. error: toast,
  22. info: toast,
  23. warn: toast
  24. };
  25. window.Vue.use(VueNotifications, options);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement