import './dropdown.less'; import * as React from 'react'; import type { JSX } from 'react'; type BoxProps = { onShowBody?: () => void; onHideBody?: () => void; allowBodyInteractions?: boolean; top?: boolean; right?: boolean; scrolling_parent?: string; children?: [ React.ReactElement, React.ReactElement | ((props: BodyProps) => JSX.Element) ]; className?: string; }; type BoxState = { top: boolean; showBody: boolean; }; declare class Box extends React.Component { static displayName: string; private rootRef; constructor(props: BoxProps, context: React.Context); componentWillUnmount(): void; _timeout?: ReturnType; _handleClickOutside: (event: MouseEvent) => void; _toggleShowBody: () => void; _getTriggerComponent(): React.ReactElement> | undefined; _setPosition: (body: HTMLElement | null) => void; _getBodyComponent(): JSX.Element | null; render(): JSX.Element; } type NativeButtonProps = React.DetailedHTMLProps, HTMLButtonElement>; type TriggerProps = Omit & { tooltip?: React.ReactNode; /** * @private the onClick prop is not to be used externally */ onClick?: NativeButtonProps['onClick']; }; type BodyProps = { setPosition?: React.Ref; children?: React.ReactNode; top?: boolean; right?: boolean; }; declare function Body({ top, right, children, setPosition }: BodyProps): JSX.Element; declare namespace Body { var displayName: string; } declare const Dropdown: { Box: typeof Box; Trigger: React.ForwardRefExoticComponent & React.RefAttributes>; Body: typeof Body; }; export { Dropdown };