import type { DropdownMenuContentProps, DropdownMenuPortalProps, DropdownMenuProps, } from '@radix-ui/react-dropdown-menu'; import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import clsx from 'clsx'; import type { ReactNode } from 'react'; import * as styles from './styles.css'; export interface MenuProps { children: ReactNode; items: ReactNode; portalOptions?: Omit; rootOptions?: Omit; contentOptions?: Omit; noPortal?: boolean; } export const Menu = ({ children, items, portalOptions, rootOptions, noPortal, contentOptions: { className = '', style: contentStyle = {}, ...otherContentOptions } = {}, }: MenuProps) => { return ( {children} {noPortal ? ( {items} ) : ( {items} )} ); };