import React, { Fragment, PropsWithChildren, ReactNode } from 'react' import * as DropdownMenu from '@radix-ui/react-dropdown-menu' import './styles.scss' import { twMerge } from 'tailwind-merge' type Props = { options?: { name: ReactNode; value: string; suffix?: ReactNode }[] className?: string onValueChanged?: (value: string) => void } const Dropdown = (props: PropsWithChildren & Props) => { return ( {props.children} {props.options?.map((e, i) => ( {i !== 0 && ( )} props.onValueChanged?.(e.value)} > {e.name}
{e.suffix} ))} ) } export { Dropdown }