import { ChevronDownIcon } from '@heroicons/react/24/solid'; import * as React from 'react'; import { DropdownMenuTrigger } from '../../../components/shadcn/Dropdown'; import { cn } from '../../../utils/cn'; export interface IMenuButtonProps { label: string | JSX.Element; title: string; disabled?: boolean; className?: string; labelClass?: string; buttonClass?: string; /** * When true: show "Label Value" in a bordered box with value in accent color. * When false: show just "Label ›" in muted gray with no box. * When undefined: legacy behavior ("Label: Value ›" split across two elements). */ isActive?: boolean; } export const MenuButton: React.FunctionComponent = ({ label, title, disabled, className, labelClass, buttonClass, isActive, }: React.PropsWithChildren) => { if (isActive === true) { return ( {label} {title} ); } if (isActive === false) { return ( {label} ); } return (
{label}:
{title}
); };