1 | import * as React from "react";
|
2 | import { AbstractPureComponent2 } from "../../common";
|
3 | import { Position } from "../../common/position";
|
4 | import { MaybeElement, Props } from "../../common/props";
|
5 | import { IconName } from "../icon/icon";
|
6 | import { IBackdropProps, OverlayableProps } from "../overlay/overlay";
|
7 | export declare enum DrawerSize {
|
8 | SMALL = "360px",
|
9 | STANDARD = "50%",
|
10 | LARGE = "90%"
|
11 | }
|
12 | export declare type DrawerProps = IDrawerProps;
|
13 | /** @deprecated use DrawerProps */
|
14 | export interface IDrawerProps extends OverlayableProps, IBackdropProps, Props {
|
15 | /** Drawer contents. */
|
16 | children?: React.ReactNode;
|
17 | /**
|
18 | * Name of a Blueprint UI icon (or an icon element) to render in the
|
19 | * drawer's header. Note that the header will only be rendered if `title` is
|
20 | * provided.
|
21 | */
|
22 | icon?: IconName | MaybeElement;
|
23 | /**
|
24 | * Whether to show the close button in the dialog's header.
|
25 | * Note that the header will only be rendered if `title` is provided.
|
26 | *
|
27 | * @default true
|
28 | */
|
29 | isCloseButtonShown?: boolean;
|
30 | /**
|
31 | * Toggles the visibility of the overlay and its children.
|
32 | * This prop is required because the component is controlled.
|
33 | */
|
34 | isOpen: boolean;
|
35 | /**
|
36 | * Position of a drawer. All angled positions will be casted into pure positions
|
37 | * (TOP, BOTTOM, LEFT or RIGHT).
|
38 | *
|
39 | * @default Position.RIGHT
|
40 | */
|
41 | position?: Position;
|
42 | /**
|
43 | * CSS size of the drawer. This sets `width` if horizontal position (default)
|
44 | * and `height` otherwise.
|
45 | *
|
46 | * Constants are available for common sizes:
|
47 | * - `DrawerSize.SMALL = 360px`
|
48 | * - `DrawerSize.STANDARD = 50%`
|
49 | * - `DrawerSize.LARGE = 90%`
|
50 | *
|
51 | * @default DrawerSize.STANDARD = "50%"
|
52 | */
|
53 | size?: number | string;
|
54 | /**
|
55 | * CSS styles to apply to the dialog.
|
56 | *
|
57 | * @default {}
|
58 | */
|
59 | style?: React.CSSProperties;
|
60 | /**
|
61 | * Title of the dialog. If provided, an element with `Classes.DIALOG_HEADER`
|
62 | * will be rendered inside the dialog before any children elements.
|
63 | */
|
64 | title?: React.ReactNode;
|
65 | /**
|
66 | * Name of the transition for internal `CSSTransition`. Providing your own
|
67 | * name here will require defining new CSS transition properties.
|
68 | */
|
69 | transitionName?: string;
|
70 | }
|
71 | /**
|
72 | * Drawer component.
|
73 | *
|
74 | * @see https://blueprintjs.com/docs/#core/components/drawer
|
75 | */
|
76 | export declare class Drawer extends AbstractPureComponent2<DrawerProps> {
|
77 | static displayName: string;
|
78 | static defaultProps: DrawerProps;
|
79 | render(): JSX.Element;
|
80 | protected validateProps(props: DrawerProps): void;
|
81 | private maybeRenderCloseButton;
|
82 | private maybeRenderHeader;
|
83 | }
|