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