fix: Simplify Button component props type definition

This commit is contained in:
Shibo Lyu 2025-05-15 02:28:38 +08:00
parent fa56942e09
commit 6bbd7a6428

View file

@ -6,10 +6,7 @@
variant?: 'primary' | 'secondary';
class?: string;
children?: import('svelte').Snippet;
} & Omit<
({ href: string } & HTMLAnchorAttributes) | ({ href?: undefined } & HTMLButtonAttributes),
'class'
>;
} & (({ href: string } & Omit<HTMLAnchorAttributes, 'href'>) | HTMLButtonAttributes);
let { variant = 'secondary', class: externalClass, children, ...rest }: Props = $props();