Closed votintsev closed 5 years ago
Hi, sorry took me some time to take a look at it. It's pretty simple, put this in plugins/vuetify.js
:
import Vue from 'vue'
import Vuetify, { VSnackbar } from 'vuetify/lib'
import VuetifyToast from 'vuetify-toast-snackbar'
Vue.use(Vuetify, {
components: {
VSnackbar
}
})
Vue.use(VuetifyToast)
Hi, @eolant . Thanks for the answer. But you provide solution not for my question. I need Combined inject.
Sorry @votintsev , I misunderstood. Please try example from nuxt documentation:
export default ({ app }, inject) => {
inject('toast', Vue.prototype.$toasted)
}
It works for me and I'm able to call toast from store context too. Note that you'll still need my previous answer to define VSnackbar
component. Just add export
at the end of the file.
Hello.
Do you have idea how I can inject you package in nuxt context. I tried created plugin like:
inspired: https://github.com/nuxt-community/modules/blob/master/packages/toast/plugin.js
But it doesn't work :(