From edd3113d5696954427ab719662dcb358f9ec25a4 Mon Sep 17 00:00:00 2001 From: LouisMazel Date: Sun, 24 Nov 2024 18:17:31 +0100 Subject: [PATCH] fix(maz-ui): MazDialog - add padding on the bottom to the content when no footer --- packages/lib/components/MazDialog.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/lib/components/MazDialog.vue b/packages/lib/components/MazDialog.vue index 034a9bcf43..5a16f8fa26 100644 --- a/packages/lib/components/MazDialog.vue +++ b/packages/lib/components/MazDialog.vue @@ -10,6 +10,7 @@ import { nextTick, ref, useAttrs, + useSlots, watch, } from 'vue' import MazBackdrop, { type MazBackdropProps } from './MazBackdrop.vue' @@ -102,6 +103,9 @@ const wrapperAttrs = computed<{ const dialogContent = ref() +const slots = useSlots() +const hasFooter = computed(() => !!slots.footer) + if (props.scrollable) { watch(() => props.modelValue, async (newVal) => { await nextTick() @@ -167,7 +171,7 @@ if (props.scrollable) { /> -
+
-