2018-05-01 10:55:57 -05:00
|
|
|
<template>
|
2024-10-02 14:34:50 -05:00
|
|
|
<app-modal :open="open" :title="title" @dismiss="runCancel">
|
|
|
|
<p class="is-size-5">{{ message }}</p>
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
<div class="buttons">
|
|
|
|
<button type="button" class="button is-primary" @click="runConfirm">OK</button>
|
|
|
|
<button type="button" class="button" @click="runCancel">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</template>
|
2018-05-01 10:55:57 -05:00
|
|
|
</app-modal>
|
|
|
|
</template>
|
|
|
|
|
2024-09-29 13:35:49 -05:00
|
|
|
<script setup>
|
|
|
|
|
2024-10-02 14:34:50 -05:00
|
|
|
const emit = defineEmits(["cancel", "confirm"]);
|
2024-09-29 13:35:49 -05:00
|
|
|
|
2024-10-02 14:34:50 -05:00
|
|
|
const props = defineProps({
|
2024-09-29 13:35:49 -05:00
|
|
|
message: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: 'Are you sure?'
|
|
|
|
},
|
|
|
|
|
2024-10-02 14:34:50 -05:00
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: "Confirm"
|
|
|
|
},
|
|
|
|
|
2024-09-29 13:35:49 -05:00
|
|
|
open: {
|
|
|
|
type: Boolean,
|
|
|
|
required: true
|
2018-05-01 10:55:57 -05:00
|
|
|
}
|
2024-09-29 13:35:49 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
function runConfirm() {
|
2024-10-02 14:34:50 -05:00
|
|
|
emit("confirm");
|
2024-09-29 13:35:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
function runCancel() {
|
2024-10-02 14:34:50 -05:00
|
|
|
emit("cancel");
|
2024-09-29 13:35:49 -05:00
|
|
|
}
|
2018-05-01 10:55:57 -05:00
|
|
|
|
|
|
|
</script>
|