import type React from "react"; import { Disclosure } from "@headlessui/react"; import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/24/outline"; import { Mono } from "./Mono.js"; export interface DropdownProps { title: string; stat?: number; icon: JSX.Element; defaultOpen?: boolean; children: React.ReactNode; } export const Dropdown = ({ title, stat, icon, defaultOpen, children, }: DropdownProps): JSX.Element => { return ( {({ open }) => ( <>
{icon}
{title} {stat !== undefined && ( {stat} )}
{open ? ( ) : ( )}
{children} )}
); };