import clsx from "clsx";
import {
Header,
Menu,
MenuItem,
type MenuItemProps,
MenuTrigger,
Popover,
type PopoverProps,
Section,
} from "react-aria-components";
import { Image } from "../Image";
import styles from "./Menu.module.css";
interface SendouMenuProps {
trigger: React.ReactNode;
scrolling?: boolean;
opensLeft?: boolean;
children: React.ReactNode;
popoverClassName?: string;
placement?: PopoverProps["placement"];
}
export function SendouMenu({
children,
trigger,
opensLeft,
scrolling,
placement,
}: SendouMenuProps) {
return (
{trigger}
);
}
export interface SendouMenuItemProps extends MenuItemProps {
icon?: React.ReactNode;
imagePath?: string;
isActive?: boolean;
isDestructive?: boolean;
}
export function SendouMenuSection({
children,
headerText,
}: {
children: React.ReactNode;
headerText?: string;
}) {
return (
{headerText ? (
) : null}
{children}
);
}
export function SendouMenuItem(props: SendouMenuItemProps) {
const textValue =
props.textValue ??
(typeof props.children === "string" ? props.children : undefined);
return (
);
}