({
label,
description,
errorMessage,
children,
items,
...props
}: SelectProps<T, M>)
| 26 | } |
| 27 | |
| 28 | export function Select<T, M extends 'single' | 'multiple' = 'single'>({ |
| 29 | label, |
| 30 | description, |
| 31 | errorMessage, |
| 32 | children, |
| 33 | items, |
| 34 | ...props |
| 35 | }: SelectProps<T, M>) { |
| 36 | return ( |
| 37 | <AriaSelect {...props}> |
| 38 | {label && <Label>{label}</Label>} |
| 39 | <Button> |
| 40 | <SelectValue /> |
| 41 | <ChevronDown /> |
| 42 | </Button> |
| 43 | {description && <Description>{description}</Description>} |
| 44 | <FieldError>{errorMessage}</FieldError> |
| 45 | <Popover hideArrow className="select-popover"> |
| 46 | <SelectListBox items={items}>{children}</SelectListBox> |
| 47 | </Popover> |
| 48 | </AriaSelect> |
| 49 | ); |
| 50 | } |
| 51 | |
| 52 | export function SelectListBox<T>(props: ListBoxProps<T>) { |
| 53 | return <DropdownListBox {...props} />; |
nothing calls this directly
no outgoing calls
no test coverage detected