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