34 lines
906 B
Vue
34 lines
906 B
Vue
<template>
|
|
<UModal v-model:open="confirmState.isOpen" :title="confirmState.title">
|
|
<template #body>
|
|
<div class="py-2 text-sm text-gray-700 dark:text-gray-300">
|
|
{{ confirmState.message }}
|
|
</div>
|
|
</template>
|
|
|
|
<template #footer>
|
|
<div class="flex justify-end gap-2 w-full">
|
|
<UButton
|
|
color="neutral"
|
|
variant="outline"
|
|
:label="confirmState.cancelText"
|
|
@click="ucoCancelConfirmModal"
|
|
/>
|
|
<UButton
|
|
color="primary"
|
|
variant="solid"
|
|
:label="confirmState.confirmText"
|
|
@click="ucoConfirm"
|
|
/>
|
|
</div>
|
|
</template>
|
|
</UModal>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useConfirmState, useConfirmActions } from "~/composables/useConfirm";
|
|
|
|
const confirmState = useConfirmState();
|
|
const { ucoConfirm, ucoCancelConfirmModal } = useConfirmActions();
|
|
</script>
|