1 | import * as React from "react";
|
2 | import { AbstractPureComponent2 } from "../../common";
|
3 | import { MaybeElement, Props } from "../../common/props";
|
4 | import { IconName } from "../icon/icon";
|
5 | import { IBackdropProps, OverlayableProps } from "../overlay/overlay";
|
6 | export declare type DialogProps = IDialogProps;
|
7 | /** @deprecated use DialogProps */
|
8 | export interface IDialogProps extends OverlayableProps, IBackdropProps, Props {
|
9 | /** Dialog contents. */
|
10 | children?: React.ReactNode;
|
11 | /**
|
12 | * Toggles the visibility of the overlay and its children.
|
13 | * This prop is required because the component is controlled.
|
14 | */
|
15 | isOpen: boolean;
|
16 | /**
|
17 | * Name of a Blueprint UI icon (or an icon element) to render in the
|
18 | * dialog's header. Note that the header will only be rendered if `title` is
|
19 | * provided.
|
20 | */
|
21 | icon?: IconName | MaybeElement;
|
22 | /**
|
23 | * Whether to show the close button in the dialog's header.
|
24 | * Note that the header will only be rendered if `title` is provided.
|
25 | *
|
26 | * @default true
|
27 | */
|
28 | isCloseButtonShown?: boolean;
|
29 | /**
|
30 | * CSS styles to apply to the dialog.
|
31 | *
|
32 | * @default {}
|
33 | */
|
34 | style?: React.CSSProperties;
|
35 | /**
|
36 | * Title of the dialog. If provided, an element with `Classes.DIALOG_HEADER`
|
37 | * will be rendered inside the dialog before any children elements.
|
38 | */
|
39 | title?: React.ReactNode;
|
40 | /**
|
41 | * Name of the transition for internal `CSSTransition`. Providing your own
|
42 | * name here will require defining new CSS transition properties.
|
43 | */
|
44 | transitionName?: string;
|
45 | /**
|
46 | * Ref supplied to the `Classes.DIALOG_CONTAINER` element.
|
47 | */
|
48 | containerRef?: React.Ref<HTMLDivElement>;
|
49 | /**
|
50 | * ID of the element that contains title or label text for this dialog.
|
51 | *
|
52 | * By default, if the `title` prop is supplied, this component will generate
|
53 | * a unique ID for the `<H5>` title element and use that ID here.
|
54 | */
|
55 | "aria-labelledby"?: string;
|
56 | /**
|
57 | * ID of an element that contains description text inside this dialog.
|
58 | */
|
59 | "aria-describedby"?: string;
|
60 | }
|
61 | /**
|
62 | * Dialog component.
|
63 | *
|
64 | * @see https://blueprintjs.com/docs/#core/components/dialog
|
65 | */
|
66 | export declare class Dialog extends AbstractPureComponent2<DialogProps> {
|
67 | static defaultProps: DialogProps;
|
68 | private titleId;
|
69 | static displayName: string;
|
70 | constructor(props: DialogProps);
|
71 | render(): JSX.Element;
|
72 | protected validateProps(props: DialogProps): void;
|
73 | private maybeRenderCloseButton;
|
74 | private maybeRenderHeader;
|
75 | }
|