reablocks
Version:
Component library for React
74 lines (72 loc) • 1.64 kB
TypeScript
import { Placement } from '../../utils/Position';
import { OverlayEvent } from '../../utils/Overlay';
import { default as React } from 'react';
export interface NestedMenuRef {
/**
* Close the menu.
*/
close: () => void;
}
export interface NestedMenuProps {
/**
* Menu contents.
*/
children: any;
/**
* Label element for the menu item.
*/
label: any;
/**
* floating-ui placement type.
*/
placement?: Placement;
/**
* CSS class applied to label element.
*/
className?: string;
/**
* CSS Properties for the label element.
*/
style?: React.CSSProperties;
/**
* CSS class applied to label element.
*/
menuClassName?: string;
/**
* CSS class applied to label element when active.
*/
activeClassName?: string;
/**
* CSS Properties for the label element.
*/
menuStyle?: React.CSSProperties;
/**
* Delay before showing tooltip.
*/
enterDelay?: number;
/**
* Delay before closing tooltip.
*/
leaveDelay?: number;
/**
* Close the menu on click or not.
*/
closeOnBodyClick?: boolean;
/**
* Close the menu on escape.
*/
closeOnEscape?: boolean;
/**
* Max height of the menu.
*/
maxHeight?: string;
/**
* Autofocus the menu on open or not.
*/
autofocus?: boolean;
/**
* Nested Menu was closed.
*/
onClose?: (event: OverlayEvent) => void;
}
export declare const NestedMenu: React.ForwardRefExoticComponent<NestedMenuProps & React.RefAttributes<NestedMenuRef>>;