Dev branch
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script setup>
|
||||
import DialogModal from './DialogModal.vue';
|
||||
import PrimaryButton from './PrimaryButton.vue';
|
||||
import DeleteDialog from './Dialogs/DeleteDialog.vue';
|
||||
|
||||
const props = defineProps({
|
||||
show: { type: Boolean, default: false },
|
||||
@@ -9,6 +8,8 @@ const props = defineProps({
|
||||
confirmText: { type: String, default: 'Potrdi' },
|
||||
cancelText: { type: String, default: 'Prekliči' },
|
||||
danger: { type: Boolean, default: false },
|
||||
itemName: { type: String, default: null },
|
||||
processing: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
const emit = defineEmits(['close', 'confirm']);
|
||||
@@ -18,21 +19,15 @@ const onConfirm = () => emit('confirm');
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogModal :show="show" @close="onClose">
|
||||
<template #title>
|
||||
{{ title }}
|
||||
</template>
|
||||
<template #content>
|
||||
<p class="text-sm text-gray-700">{{ message }}</p>
|
||||
<div class="mt-6 flex items-center justify-end gap-3">
|
||||
<button type="button" class="px-4 py-2 rounded-md border border-gray-300 text-gray-700 hover:bg-gray-50" @click="onClose">
|
||||
{{ cancelText }}
|
||||
</button>
|
||||
<PrimaryButton :class="danger ? 'bg-red-600 hover:bg-red-700 focus:ring-red-500' : ''" @click="onConfirm">
|
||||
{{ confirmText }}
|
||||
</PrimaryButton>
|
||||
</div>
|
||||
</template>
|
||||
</DialogModal>
|
||||
|
||||
<DeleteDialog
|
||||
:show="show"
|
||||
:title="title"
|
||||
:message="message"
|
||||
:item-name="itemName"
|
||||
:confirm-text="confirmText"
|
||||
:cancel-text="cancelText"
|
||||
:processing="processing"
|
||||
@close="onClose"
|
||||
@confirm="onConfirm"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user