1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-19 15:29:59 +00:00
elk/components/modal/ModalConfirm.vue

29 lines
720 B
Vue
Raw Normal View History

<script setup lang="ts">
import type { ConfirmDialogChoice, ConfirmDialogLabel } from '~/types'
defineProps<ConfirmDialogLabel>()
const emit = defineEmits<{
(evt: 'choice', choice: ConfirmDialogChoice): void
}>()
</script>
<template>
<div flex="~ col" gap-6>
<div font-bold text-lg text-center>
{{ title }}
</div>
<div v-if="description">
{{ description }}
</div>
<div flex justify-end gap-2>
<button btn-text @click="emit('choice', 'cancel')">
2023-01-16 08:56:36 +00:00
{{ cancel || $t('confirm.common.cancel') }}
</button>
<button btn-solid @click="emit('choice', 'confirm')">
2023-01-16 08:56:36 +00:00
{{ confirm || $t('confirm.common.confirm') }}
</button>
</div>
</div>
</template>