import { Fragment } from 'react' import { Menu, Transition } from '@headlessui/react' import clsx from 'clsx' export function MenuButton(props: { buttonContent: JSX.Element menuItems: { name: string; href: string; onClick?: () => void }[] className?: string }) { const { buttonContent, menuItems, className } = props return (
Open user menu {buttonContent}
{menuItems.map((item) => ( {({ active }) => ( {item.name} )} ))}
) }