add showClear and size props to ElementPicker

This commit is contained in:
Justin Edmund 2026-01-04 16:08:54 -08:00
parent 55ac4df9f2
commit 3f12de975a
2 changed files with 8 additions and 0 deletions

View file

@ -363,6 +363,7 @@
multiple={true}
includeAny={true}
contained={true}
showClear={true}
/>
</div>

View file

@ -17,6 +17,7 @@
mode?: 'auto' | 'segmented' | 'dropdown'
contained?: boolean
size?: 'small' | 'medium' | 'large'
showClear?: boolean
disabled?: boolean
class?: string
}
@ -29,10 +30,14 @@
mode = 'auto',
contained = false,
size = 'medium',
showClear = false,
disabled = false,
class: className = ''
}: Props = $props()
// Map size to segmented control size (small stays small, medium/large become regular)
const segmentedSize = $derived(size === 'small' ? 'small' : 'regular')
// Responsive detection for auto mode
let isMobile = $state(false)
@ -115,6 +120,8 @@
{multiple}
{includeAny}
{contained}
{showClear}
size={segmentedSize}
disabled={disabled}
class={className}
/>