@blueprintjs/core
Version:
Core styles & components
42 lines (41 loc) • 1.72 kB
TypeScript
import * as React from "react";
import type { OverlayProps } from "../overlay/overlayProps";
import type { OverlayInstance } from "./overlayInstance";
export interface Overlay2Props extends OverlayProps, React.RefAttributes<OverlayInstance> {
/**
* If you provide a single child element to Overlay2 and attach your own `ref` to the node, you must pass the
* same value here (otherwise, Overlay2 won't be able to render CSSTransition correctly).
*
* Mutually exclusive with the `childRefs` prop. This prop is a shorthand for `childRefs={{ [key: string]: ref }}`.
*/
childRef?: React.RefObject<HTMLElement>;
/**
* If you provide a _multiple child elements_ to Overlay2, you must enumerate and generate a
* collection of DOM refs to those elements and provide it here. The object's keys must correspond to the child
* React element `key` values.
*
* Mutually exclusive with the `childRef` prop. If you only provide a single child element, consider using
* `childRef` instead.
*/
childRefs?: Record<string, React.RefObject<HTMLElement>>;
}
export declare const OVERLAY2_DEFAULT_PROPS: {
autoFocus: boolean;
backdropProps: {};
canEscapeKeyClose: boolean;
canOutsideClickClose: boolean;
enforceFocus: boolean;
hasBackdrop: boolean;
isOpen: boolean;
lazy: boolean;
shouldReturnFocusOnClose: boolean;
transitionDuration: number;
transitionName: string;
usePortal: boolean;
};
/**
* Overlay2 component.
*
* @see https://blueprintjs.com/docs/#core/components/overlay2
*/
export declare const Overlay2: React.ForwardRefExoticComponent<Omit<Overlay2Props, "ref"> & React.RefAttributes<OverlayInstance>>;