import React, { Ref } from "react"; import { AriaMenuProps, AriaMenuTriggerProps } from "react-aria"; import { MenuTriggerProps, MenuTriggerState } from "react-stately"; import { DOMAttributes, FocusableElement } from "@react-types/shared"; import { Prettify } from "../../utils/types"; export type MenuProps = Prettify<{ /** * The label for the menu trigger button. * Can be a React node, or a function that returns a React node. * @param props - The props passed to the menu trigger button. * @param props.state - The current state of the menu. * @param props.props - The DOM attributes for the menu trigger button. This must be passed to the menu trigger button element. * @param props.ref - The ref for the menu trigger button. This must be passed to the menu trigger button element. * @returns A React node to be used as the label for the menu trigger button. */ label: React.ReactNode | ((props: { state: MenuTriggerState; props: DOMAttributes; ref: Ref; }) => React.ReactNode); } & MenuTriggerProps & AriaMenuTriggerProps & AriaMenuProps>;