Refactor #4433 - ConfirmDialog

pull/4476/head
Tuğçe Küçükoğlu 2023-09-19 14:16:07 +03:00
parent 1fce3d50a5
commit 9beab952eb
2 changed files with 9 additions and 1 deletions

View File

@ -224,6 +224,14 @@ export interface ConfirmDialogSlots {
* Close dialog function.
*/
onClose: () => void;
/**
* Accept function of the component
*/
onAccept: () => void;
/**
* Reject function of the component
*/
onReject: () => void;
}): VNode[];
}

View File

@ -15,7 +15,7 @@
:unstyled="unstyled"
>
<template v-if="$slots.container" #container="slotProps">
<slot name="container" :message="confirmation" :onClose="slotProps.onClose" />
<slot name="container" :message="confirmation" :onClose="slotProps.onClose" :onAccept="accept" :onReject="reject" />
</template>
<template v-if="!$slots.container">
<template v-if="!$slots.message">