api-client/components/smart/ConfirmModal.vue

56 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<SmartModal v-if="show" @close="hideModal">
<template #header>
<h3 class="heading">{{ $t("confirm") }}</h3>
<div>
<button class="icon button" @click="hideModal">
<i class="material-icons">close</i>
</button>
</div>
</template>
<template #body>
<label>{{ title }}</label>
</template>
<template #footer>
<span></span>
<span>
<button class="icon button" @click="hideModal">
{{ no }}
</button>
<button class="icon button primary" @click="resolve">
{{ yes }}
</button>
</span>
</template>
</SmartModal>
</template>
<script>
export default {
props: {
show: Boolean,
2021-05-18 16:09:55 +00:00
title: { type: String, default: null },
yes: {
type: String,
2021-05-18 09:27:29 +00:00
default() {
return this.$t("yes")
},
},
no: {
type: String,
2021-05-18 09:27:29 +00:00
default() {
return this.$t("no")
},
},
},
methods: {
hideModal() {
this.$emit("hide-modal")
},
resolve() {
this.$emit("resolve")
},
},
}
</script>