UNPKG

@react-md/menu

Version:

Create menus that auto-position themselves within the viewport and adhere to the accessibility guidelines

21 lines (20 loc) 1.06 kB
import type { ReactElement, ReactNode, Ref } from "react"; import type { BaseMenuRendererProps, MenuListProps, MenuTransitionProps, ProvidedMenuProps } from "./types"; /** * @internal * @remarks \@since 5.0.0 */ export declare type MenuRendererProps = ProvidedMenuProps & BaseMenuRendererProps & MenuListProps & MenuTransitionProps & { menuRef: Ref<HTMLDivElement>; visible: boolean; onRequestClose(): void; children: ReactNode; }; /** * This component conditionally renders either the `Menu` or `MenuSheet` * component based on the current menu configuration. * * @internal * @remarks \@since 5.0.0 */ export declare function MenuRenderer({ menuRef, menuProps, menuStyle, menuClassName, sheetProps, sheetHeader: propSheetHeader, sheetFooter: propSheetFooter, sheetStyle, sheetClassName, sheetMenuProps, children, horizontal: propHorizontal, renderAsSheet: propRenderAsSheet, sheetPosition: propSheetPosition, sheetVerticalSize: propSheetVerticalSize, onRequestClose, onClick, onKeyDown, ...props }: MenuRendererProps): ReactElement;