useToast
Vue composable for handling toaster plugin in your components
WARNING
You must install toaster plugin before use it
TIP
More info about toaster plugin in its documentation
Usage
vue
<script lang="ts" setup>
import { useToast } from 'maz-ui'
const toast = useToast()
toast.info('info message', {
action: {
func: () => toast.success('clicked'),
text: 'Click me',
closeToast: true
}
})
toast.success('success message', {
link: {
href: '/composables/use-toast',
text: 'Follow me',
closeToast: true,
}
})
toast.warning('warning message')
toast.error('error message')
</script>