fix: add undefined to Button Props interface

- Add | undefined to all optional properties in Button Props interface
- This fixes 4 type errors related to Button component usage with exactOptionalPropertyTypes

Reduces errors from 57 to 53 (65% reduction from original 151).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Justin Edmund 2025-11-28 18:56:08 -08:00
parent a88dd89873
commit 36e2916dea

View file

@ -8,47 +8,47 @@
interface Props { interface Props {
/** Button variant style */ /** Button variant style */
variant?: 'primary' | 'secondary' | 'ghost' | 'text' | 'destructive' | 'notice' | 'subtle' variant?: 'primary' | 'secondary' | 'ghost' | 'text' | 'destructive' | 'notice' | 'subtle' | undefined
/** Button size */ /** Button size */
size?: 'small' | 'medium' | 'large' | 'icon' size?: 'small' | 'medium' | 'large' | 'icon' | undefined
/** Whether button is contained */ /** Whether button is contained */
contained?: boolean contained?: boolean | undefined
/** Element color theme */ /** Element color theme */
element?: 'wind' | 'fire' | 'water' | 'earth' | 'dark' | 'light' element?: 'wind' | 'fire' | 'water' | 'earth' | 'dark' | 'light' | undefined
/** Use element styling (overrides variant colors) */ /** Use element styling (overrides variant colors) */
elementStyle?: boolean elementStyle?: boolean | undefined
/** Whether button is active */ /** Whether button is active */
active?: boolean active?: boolean | undefined
/** Save button behavior */ /** Save button behavior */
save?: boolean save?: boolean | undefined
/** Whether saved (for save buttons) */ /** Whether saved (for save buttons) */
saved?: boolean saved?: boolean | undefined
/** Full width button */ /** Full width button */
fullWidth?: boolean fullWidth?: boolean | undefined
/** Icon only mode */ /** Icon only mode */
iconOnly?: boolean iconOnly?: boolean | undefined
/** Additional CSS classes */ /** Additional CSS classes */
class?: string class?: string | undefined
/** Button content */ /** Button content */
children?: Snippet children?: Snippet | undefined
/** Left accessory content */ /** Left accessory content */
leftAccessory?: Snippet leftAccessory?: Snippet | undefined
/** Right accessory content */ /** Right accessory content */
rightAccessory?: Snippet rightAccessory?: Snippet | undefined
/** Icon name (legacy support) */ /** Icon name (legacy support) */
icon?: string icon?: string | undefined
/** Icon position (legacy support) */ /** Icon position (legacy support) */
iconPosition?: 'left' | 'right' iconPosition?: 'left' | 'right' | undefined
/** Whether button is disabled */ /** Whether button is disabled */
disabled?: boolean disabled?: boolean | undefined
/** Optional href to render as anchor */ /** Optional href to render as anchor */
href?: string href?: string | undefined
/** Click handler */ /** Click handler */
onclick?: () => void onclick?: (() => void) | undefined
/** Shape of the button corners */ /** Shape of the button corners */
shape?: 'default' | 'circular' | 'circle' | 'pill' shape?: 'default' | 'circular' | 'circle' | 'pill' | undefined
/** Element tag override (for slots/triggers) */ /** Element tag override (for slots/triggers) */
as?: 'button' | 'a' | 'span' as?: 'button' | 'a' | 'span' | undefined
/** Any additional HTML attributes */ /** Any additional HTML attributes */
[key: string]: any [key: string]: any
} }