forked from AkkomaGang/akkoma-fe
floatingghost
776bee889e
supercedes #135 adapted from https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1431 Co-authored-by: Tusooa Zhu <tusooa@kazv.moe> Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk> Reviewed-on: AkkomaGang/pleroma-fe#140
37 lines
694 B
JavaScript
37 lines
694 B
JavaScript
import DialogModal from '../dialog_modal/dialog_modal.vue'
|
|
|
|
/**
|
|
* This component emits the following events:
|
|
* cancelled, emitted when the action should not be performed;
|
|
* accepted, emitted when the action should be performed;
|
|
*
|
|
* The caller should close this dialog after receiving any of the two events.
|
|
*/
|
|
const ConfirmModal = {
|
|
components: {
|
|
DialogModal
|
|
},
|
|
props: {
|
|
title: {
|
|
type: String
|
|
},
|
|
cancelText: {
|
|
type: String
|
|
},
|
|
confirmText: {
|
|
type: String
|
|
}
|
|
},
|
|
computed: {
|
|
},
|
|
methods: {
|
|
onCancel () {
|
|
this.$emit('cancelled')
|
|
},
|
|
onAccept () {
|
|
this.$emit('accepted')
|
|
}
|
|
}
|
|
}
|
|
|
|
export default ConfirmModal
|