import { Fragment, MouseEventHandler, ReactNode } from "react"; import { Menu, Transition } from "@headlessui/react"; import clsx from "clsx"; import Link from "next/link"; interface Props { right?: boolean; title: string; options: { title: string; routePath?: string; onClick?: () => void; disabled?: boolean; }[]; children?: ReactNode; className?: string; btnClassName?: string; onClick?: MouseEventHandler; } export default function DropdownStyless({ title, options, right, onClick, className, btnClassName }: Props) { return (
{title} {!btnClassName && ( )}
{options.map((item, idx) => { return ( {({ active, close }) => ( <> {item.onClick && ( )} {item.routePath && ( {item.title} )} )} ); })}
); }