Skip to content

Commit 9d20872

Browse files
committed
feat: add ability to pass backgroundCustomClasses and modalCustomClasses for the afcl modal
1 parent 7bd075b commit 9d20872

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

adminforth/spa/src/afcl/Modal.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
<slot name="trigger"></slot>
77
</div>
88
<Teleport to="body">
9-
<div v-show="isModalOpen" v-if="!removeFromDom" @click="backdropClick" class="bg-black/50 overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full h-full md:inset-0 h-1rem max-h-full flex" >
9+
<div
10+
v-show="isModalOpen"
11+
v-if="!removeFromDom"
12+
@click="backdropClick"
13+
class="bg-black/50 overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full h-full md:inset-0 h-1rem max-h-full flex"
14+
:class="props.backgroundCustomClasses"
15+
>
1016
<!-- Modal content -->
1117
<div v-bind="$attrs" class="relative bg-lightDialogBackgorund rounded-lg shadow-sm dark:bg-darkDialogBackgorund">
1218

@@ -19,6 +25,7 @@
1925
<div
2026
v-if="showConfirmationOnClose"
2127
class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-[60]"
28+
:class="props.modalCustomClasses"
2229
>
2330
<div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-lg max-w-sm w-full">
2431
<h2 class="text-lg font-semibold mb-4 text-lightDialogHeaderText dark:text-darkDialogHeaderText">Confirm Close</h2>
@@ -64,6 +71,8 @@ interface DialogProps {
6471
askForCloseConfirmation?: boolean
6572
closeConfirmationText?: string
6673
removeFromDomOnClose?: boolean
74+
backgroundCustomClasses?: string
75+
modalCustomClasses?: string
6776
}
6877
6978
const props = withDefaults(defineProps<DialogProps>(), {
@@ -74,6 +83,8 @@ const props = withDefaults(defineProps<DialogProps>(), {
7483
askForCloseConfirmation: false,
7584
closeConfirmationText: 'Are you sure you want to close this dialog?',
7685
removeFromDomOnClose: false,
86+
backgroundCustomClasses: '',
87+
modalCustomClasses: '',
7788
})
7889
7990
const showConfirmationOnClose = ref(false);

0 commit comments

Comments
 (0)