@react-md/menu
Version:
Create menus that auto-position themselves within the viewport and adhere to the accessibility guidelines
27 lines (26 loc) • 1.23 kB
TypeScript
import type { ReactElement, ReactNode } from "react";
import type { MenuConfiguration, MenuConfigurationContext } from "./types";
/** @remarks \@since 5.0.0 */
export declare const DEFAULT_MENU_CONFIGURATION: Readonly<MenuConfigurationContext>;
/**
* This is probably just an internal only hook that allows you to get the
* {@link MenuConfigurationContext} with optional overrides.
*
* @param overrides - An object of {@link MenuConfiguration} that would override
* the inherited context values if they are not `undefined`.
* @returns the {@link MenuConfigurationContext} with any overrides that were
* provided.
* @remarks \@since 5.0.0
*/
export declare function useMenuConfiguration({ horizontal, renderAsSheet, sheetHeader, sheetFooter, sheetPosition, sheetVerticalSize, }?: MenuConfiguration): Readonly<MenuConfigurationContext>;
/** @remarks \@since 5.0.0 */
export interface MenuConfigurationProviderProps extends MenuConfiguration {
children: ReactNode;
}
/**
* Note: This will always merge values with any parent
* `MenuConfigurationProvider`s.
*
* @remarks \@since 5.0.0
*/
export declare function MenuConfigurationProvider({ children, ...configuration }: MenuConfigurationProviderProps): ReactElement;