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 type { MenuItemProps, Props } from "./types"; // constants import { classNames } from "constants/common"; const CustomMenu = ({ children, label, className = "", ellipsis = false, width = "auto", textAlignment, withoutBorder = false, optionsPosition = "right", }: Props) => { return (
{ellipsis ? ( ) : ( {label} {!withoutBorder && )}
{children}
); }; const MenuItem: React.FC = ({ children, renderAs, href, onClick }) => { return ( {({ active, close }) => renderAs === "a" ? ( {children} ) : ( ) } ); }; CustomMenu.MenuItem = MenuItem; export default CustomMenu;