import type { FC, LegacyRef, PropsWithoutRef, ReactNode } from 'react' import type { ExtractProps } from '../types' import { ListboxOption, Transition } from '@headlessui/react' import { ArrowRightIcon } from '@heroicons/react/24/solid' import classNames from 'classnames' import { forwardRef, useState } from 'react' export type SelectOptionProps = PropsWithoutRef> & { href?: string children?: ReactNode showArrow?: boolean ref?: LegacyRef } const SelectOption: FC = forwardRef(({ className, children, showArrow = true, ...props }, ref) => { const [hover, setHover] = useState(false) return ( classNames( active ? 'text-black dark:text-white bg-black/[0.06] dark:bg-white/[0.06]' : 'text-high-emphesis', 'flex gap-2 px-2 items-center font-medium text-sm cursor-default select-none relative py-3 rounded-2xl whitespace-nowrap', className, )} onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)} ref={ref} > {children}
) }) export default SelectOption