import { ChevronDownIcon } from "@heroicons/react/24/outline"; import clsx from "clsx"; import type { ComponentProps, ReactNode } from "react"; import { Label, SelectValue, Select as BaseSelect, Popover, ListBox, ListBoxItem, } from "react-aria-components"; import { Button } from "../Button"; type Props = Omit< ComponentProps, "selectedKey" | "onSelectionChange" > & { label: ReactNode; selectedKey: T; onSelectionChange: (newValue: T) => void; options: readonly T[]; show?: (value: T) => string; }; export const Select = ({ className, options, show, selectedKey, onSelectionChange, label, ...props }: Props) => ( ({ id }))} > {({ id }) => ( {show?.(id) ?? id} )} );