fix(ui): make Button.children optional in props type
Deploy / verify (push) Successful in 53s
Deploy / deploy (push) Successful in 1m7s

svelte-check (strict) flagged ContactFormComponent for not passing
children to <Button>. The component already renders label as fallback;
typed children as optional Snippet so callers don't need to pass it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-05-21 11:47:20 +02:00
parent bcf1502093
commit 0aa3898e5b
+11 -1
View File
@@ -2,6 +2,8 @@
type Variant = 'primary' | 'secondary' | 'ghost';
type Size = 'sm' | 'md' | 'large';
import type { Snippet } from 'svelte';
let {
variant = 'primary',
size = 'md',
@@ -9,7 +11,15 @@
loading = false,
type = 'button' as 'button' | 'submit' | 'reset',
label = '',
children,
children = undefined,
}: {
variant?: 'primary' | 'secondary' | 'ghost';
size?: 'sm' | 'md' | 'large';
disabled?: boolean;
loading?: boolean;
type?: 'button' | 'submit' | 'reset';
label?: string;
children?: Snippet;
} = $props();
const base =