@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
16 lines (15 loc) • 716 B
TypeScript
import type { ReferenceType } from '@floating-ui/react';
export interface SubMenuContextValue {
opened: boolean;
close: () => void;
open: () => void;
focusFirstItem: () => void;
focusParentItem: () => void;
parentContext: SubMenuContextValue | null;
setReference: (node: ReferenceType | null) => void;
setFloating: (node: HTMLElement | null) => void;
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
registerOpenSub: (closeFn: () => void) => () => void;
}
export declare const SubMenuContext: import("react").Context<SubMenuContextValue | null>;