import { useListItem } from "@floating-ui/react"; import { useSelect } from "."; import clsx from "clsx"; import { Option } from "./interface"; type Props = O; export function SelectOption({ label }: Props) { const { activeIndex, selectedIndex, getItemProps, handleSelect } = useSelect(); const { ref, index } = useListItem({ label }); const isActive = activeIndex === index; const isSelected = selectedIndex === index; return ( ); }