From 6bbd7a6428b0e98c30934c0c4c4c6bf6f27d41a2 Mon Sep 17 00:00:00 2001 From: Shibo Lyu Date: Thu, 15 May 2025 02:28:38 +0800 Subject: [PATCH] fix: Simplify Button component props type definition --- src/lib/components/Button.svelte | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index dc02f82..7d7988a 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -6,10 +6,7 @@ variant?: 'primary' | 'secondary'; class?: string; children?: import('svelte').Snippet; - } & Omit< - ({ href: string } & HTMLAnchorAttributes) | ({ href?: undefined } & HTMLButtonAttributes), - 'class' - >; + } & (({ href: string } & Omit) | HTMLButtonAttributes); let { variant = 'secondary', class: externalClass, children, ...rest }: Props = $props();