1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import { PopupProps } from '../overlay';
|
5 | import { CloseMode } from '../dialog';
|
6 | import CommonProps from '../util';
|
7 |
|
8 | interface HTMLAttributesWeak extends PopupProps {
|
9 | title?: any;
|
10 | onClose?: any;
|
11 | }
|
12 |
|
13 | export interface DrawerProps extends HTMLAttributesWeak, CommonProps {
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | closeable?: 'close' | 'mask' | 'esc' | boolean | 'close,mask' | 'close,esc' | 'mask,esc';
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | closeMode?: CloseMode[] | 'close' | 'mask' | 'esc';
|
32 | |
33 |
|
34 |
|
35 | cache?: boolean;
|
36 | |
37 |
|
38 |
|
39 | title?: React.ReactNode;
|
40 | |
41 |
|
42 |
|
43 | bodyStyle?: React.CSSProperties;
|
44 | headerStyle?: React.CSSProperties;
|
45 | |
46 |
|
47 |
|
48 |
|
49 |
|
50 | animation?: { in: string; out: string; } | boolean;
|
51 | visible?: boolean;
|
52 |
|
53 | |
54 |
|
55 |
|
56 | width?: number | string;
|
57 |
|
58 | |
59 |
|
60 |
|
61 | height?: number | string;
|
62 | |
63 |
|
64 |
|
65 |
|
66 | onVisibleChange?: (visible: boolean, reason: string) => void;
|
67 | |
68 |
|
69 |
|
70 | afterClose?: () => void;
|
71 | onClose?: (reason: string, e: React.MouseEvent) => void;
|
72 | |
73 |
|
74 |
|
75 | placement?: 'top' | 'right' | 'bottom' | 'left';
|
76 | |
77 |
|
78 |
|
79 | v2?: boolean;
|
80 |
|
81 | |
82 |
|
83 |
|
84 | content?: React.ReactNode;
|
85 | }
|
86 |
|
87 |
|
88 | export interface QuickShowRet {
|
89 | hide: () => void;
|
90 | }
|
91 |
|
92 | export default class Drawer extends React.Component<DrawerProps, any> {
|
93 | static show(config: DrawerProps): QuickShowRet;
|
94 | }
|