import { ComponentProps, forwardRef, ReactElement } from 'react'; import { clsx } from 'clsx'; import { createComponentGroup } from '../utility/component-group'; import { Trigger, Portal, Content as RadixContent, Item as RadixItem, DropdownMenuContentProps, DropdownMenuItemProps, Root, } from '@radix-ui/react-dropdown-menu'; import './dropdown.css'; const Button = forwardRef>( (props, ref) => (
), ); Button.displayName = 'DropdownMenuButton'; function Content({ children, align = 'start', sideOffset = 5, className, ...props }: DropdownMenuContentProps): ReactElement { return ( {children} ); } const Item = ({ className, children, ...props }: DropdownMenuItemProps) => ( {children} ); export const DropdownMenu = createComponentGroup(Root, { Button, Item, Content, });