Licence
MIT
Version
0.0.1
Deps
1
Size
5 kB
Vulns
0
Weekly
0
izi-toaster
Nuxt module for izitoast
Setup
- Add
izi-toasterdependency to your project
yarn add izi-toaster # or npm install izi-toaster
- Add
izi-toasterto themodulessection ofnuxt.config.js
{
modules: [
'izi-toaster'
]
}
Usage
You can use $toaster in almost any context using app.$toaster or this.$toaster (Including store actions).
See toasted official docs for more usage information.
export default {
methods:{
async login() {
try {
this.$toaster.show('Logging in...')
await this.$axios.$post('auth/login')
this.$toaster.success('Successfully authenticated')
} catch(e){
this.$toaster.error('Error while authenticating')
}
}
}
}
License
Copyright (c) sajan sajan.sahu@live.com