From c82262e02d2bdf687c3ddcfe27e0ba70bdc59d79 Mon Sep 17 00:00:00 2001 From: webfussel Date: Wed, 29 Jan 2025 09:21:57 +0100 Subject: [PATCH] CHANGE: remove withDefaults Remove with defaults as it is no longer needed --- components/Button.vue | 6 +++--- components/Technology.vue | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/components/Button.vue b/components/Button.vue index 3ed7132..1b89df0 100644 --- a/components/Button.vue +++ b/components/Button.vue @@ -12,9 +12,9 @@ type Props = { label : string } -const props = withDefaults(defineProps(), { - type : 'a' -}) +const { + type = 'a' +} = defineProps() const actualProps = () => { if (props.type === 'a') { diff --git a/components/Technology.vue b/components/Technology.vue index 373e96e..fe87123 100644 --- a/components/Technology.vue +++ b/components/Technology.vue @@ -17,10 +17,11 @@ type Props = { size?: 's' | 'm' | 'l' } -const {name, size, width} = withDefaults(defineProps(), { - size: 'm', - width: 50, -}) +const { + name, + size = 'm', + width = 50, +} = defineProps() const sizes = { s: 15,