import React from "react"; // next import Link from "next/link"; // headless ui import { Menu, Transition } from "@headlessui/react"; // icons import { ChevronDownIcon, EllipsisHorizontalIcon } from "@heroicons/react/24/outline"; // types import { MenuItemProps, Props } from "./types"; // constants const CustomMenu = ({ children, label, className = "", ellipsis = false, width = "auto", textAlignment, noBorder = false, optionsPosition = "right", }: Props) => (
{ellipsis ? ( ) : ( {label} {!noBorder && )}
{children}
); const MenuItem: React.FC = ({ children, renderAs, href, onClick, className = "", }) => ( {({ active, close }) => renderAs === "a" ? ( {children} ) : ( ) } ); CustomMenu.MenuItem = MenuItem; export { CustomMenu };