import { HTMLAttributes, FC, ReactNode } from 'react'; declare type BaseElement = HTMLDivElement; declare type BaseProps = HTMLAttributes; /** * Pop-over component * * Used to render some content positioned relative to an anchor, but as a child * of the document. By default the PopOver content is positioned below the * anchor aligned to the left. When the content would overflow the document, it's * repositioned stay within the document boundaries. */ export interface PopOverProps extends BaseProps { readonly children?: ReactNode; /** * The element to anchor the pop-over to. */ readonly anchorEl: HTMLElement | null; /** * Renders the pop-over at the same DOM-level as the * anchorEl, not at the root layer which is by default. * * Default: `false` */ readonly inline?: boolean; /** * The horizontal position of the pop-over relative to the anchor. * * Default: `'left'` */ readonly horizontalPosition?: 'left' | 'right' | 'center'; /** * The vertical position of the pop-over relative to the anchor. * * Default: `'bottom'` */ readonly verticalPosition?: 'top' | 'bottom' | 'center'; /** * Which side of the pop-over to align horizontally with the anchor position. * * Default: `'left'` */ readonly horizontalAlignment?: 'left' | 'right' | 'center'; /** * Which side of the pop-over to align vertically with the anchor position. * * Default: `'top'` */ readonly verticalAlignment?: 'top' | 'bottom' | 'center'; /** * Callback, called when the popover element needs to be repositioned. By * default an alignment position is used with the values given from * `horizontalPosition`, `verticalPosition`, `horizontalAlignment` and * `verticalAlignment`. * * If an `onPosition` function is given that is being used instead of the * default positioning function. * * Default: `undefined` */ readonly onPosition?: (anchor: HTMLElement, popOverContainer: HTMLElement) => void; /** * Callback, called when the popover element have been scrolled * * Default: `undefined` */ readonly onScroll?: () => void; } export declare const PopOver: FC; export {};