From da39d28b93d1b3aee637790bd3c5301763a80073 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 23 Aug 2023 17:26:04 +0200 Subject: [PATCH] fix: Add missing defaults to DialogButton Signed-off-by: Ferdinand Thiessen --- lib/components/DialogButton.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/components/DialogButton.vue b/lib/components/DialogButton.vue index d3d073be..628343e4 100644 --- a/lib/components/DialogButton.vue +++ b/lib/components/DialogButton.vue @@ -14,12 +14,15 @@ import { NcButton } from '@nextcloud/vue' // with vue 3.3: // const props = defineProps() -const props = defineProps<{ +const props = withDefaults(defineProps<{ callback: IDialogButton['callback'], label: IDialogButton['label'], - icon: IDialogButton['icon'], - type: IDialogButton['type'], -}>() + icon?: IDialogButton['icon'], + type?: IDialogButton['type'], +}>(), { + icon: undefined, + type: 'secondary', +}) const emit = defineEmits<(e: 'click', event: MouseEvent) => void>()