UNPKG

1.83 kBTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2 } from "../../common";
3import { Props, MaybeElement } from "../../common/props";
4import { IconName } from "../icon/icon";
5import { IBackdropProps, OverlayableProps } from "../overlay/overlay";
6export declare type DialogProps = IDialogProps;
7/** @deprecated use DialogProps */
8export interface IDialogProps extends OverlayableProps, IBackdropProps, Props {
9 /**
10 * Toggles the visibility of the overlay and its children.
11 * This prop is required because the component is controlled.
12 */
13 isOpen: boolean;
14 /**
15 * Name of a Blueprint UI icon (or an icon element) to render in the
16 * dialog's header. Note that the header will only be rendered if `title` is
17 * provided.
18 */
19 icon?: IconName | MaybeElement;
20 /**
21 * Whether to show the close button in the dialog's header.
22 * Note that the header will only be rendered if `title` is provided.
23 *
24 * @default true
25 */
26 isCloseButtonShown?: boolean;
27 /**
28 * CSS styles to apply to the dialog.
29 *
30 * @default {}
31 */
32 style?: React.CSSProperties;
33 /**
34 * Title of the dialog. If provided, an element with `Classes.DIALOG_HEADER`
35 * will be rendered inside the dialog before any children elements.
36 */
37 title?: React.ReactNode;
38 /**
39 * Name of the transition for internal `CSSTransition`. Providing your own
40 * name here will require defining new CSS transition properties.
41 */
42 transitionName?: string;
43}
44export declare class Dialog extends AbstractPureComponent2<DialogProps> {
45 static defaultProps: DialogProps;
46 static displayName: string;
47 render(): JSX.Element;
48 protected validateProps(props: DialogProps): void;
49 private maybeRenderCloseButton;
50 private maybeRenderHeader;
51}