se-panfilov / vue-notifications

Vue.js agnostic library for non-blocking notifications
https://se-panfilov.github.io/vue-notifications/
MIT License
698 stars 54 forks source link

config with miniToaster in nuxt app #160

Open shahzaibanwar009 opened 5 years ago

shahzaibanwar009 commented 5 years ago

config with miniToaster in nuxt app I installed vue-notification plugin and configured it.it is working fine i wanna add mini-toaster how to setup mini-toaster

JPeer264 commented 5 years ago

That should make it:

miniToastr.init();

const toast = ({ title, message, type, timeout, cb }) => (
    miniToastr[type](message, title, timeout, cb)
);

const options = {
  success: toast,
  error: toast,
  info: toast,
  warn: toast,
};

Vue.use(VueNotifications, options);

https://github.com/se-panfilov/vue-notifications#all-together