useDialog
Vue composable for handling dialog plugin in your components
WARNING
You must install dialog plugin before use it
TIP
More info about dialog plugin in its documentation
Vue composable for handling dialog plugin in your components
WARNING
You must install dialog plugin before use it
TIP
More info about dialog plugin in its documentation
<script lang="ts" setup>
import { useDialog, useToast } from 'maz-ui/composables'
const dialog = useDialog()
const toast = useToast()
function openDialog() {
dialog.open({
title: 'Dialog title',
message: 'Dialog message',
onAccept: (response) => {
toast.success(`Dialog accepted`, {
position: 'bottom',
})
},
onReject: (response) => {
toast.error(`Dialog rejected`, {
position: 'bottom',
})
},
})
}
</script>
<template>
<MazBtn @click="openDialog">
Open Dialog
</MazBtn>
</template>