import type { Dispatch, ReactNode, SetStateAction } from 'react'; import Button from '~/components/Button'; import IconButton from '~/components/IconButton'; import { Button as AriaButton, Menu as AriaMenu, MenuItem, MenuTrigger, Popover, } from 'react-aria-components'; import { cn } from '~/utils/cn'; function Items(props: Parameters[0]) { return ( {props.children} ); } type ButtonProps = Parameters[0] & { readonly control?: [boolean, Dispatch>]; }; function ItemButton(props: ButtonProps) { return ( { props.onPress?.(event); props.control?.[1](true); }} /> ); } function Item(props: Parameters[0]) { return ( ); } function Menu({ children }: { children: ReactNode }) { return {children}; } export default Object.assign(Menu, { IconButton, Button, Item, ItemButton, Items });