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 | closeable?: 'close' | 'mask' | 'esc' | boolean | 'close,mask' | 'close,esc' | 'mask,esc';
|
23 | |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | closeMode?: CloseMode[] | 'close' | 'mask' | 'esc';
|
31 | |
32 |
|
33 |
|
34 | cache?: boolean;
|
35 | |
36 |
|
37 |
|
38 | title?: React.ReactNode;
|
39 | |
40 |
|
41 |
|
42 | bodyStyle?: React.CSSProperties;
|
43 | headerStyle?: React.CSSProperties;
|
44 | |
45 |
|
46 |
|
47 |
|
48 |
|
49 | animation?: { in: string; out: string; } | boolean;
|
50 | visible?: boolean;
|
51 |
|
52 | |
53 |
|
54 |
|
55 | width?: number | string;
|
56 |
|
57 | |
58 |
|
59 |
|
60 | height?: number | string;
|
61 | |
62 |
|
63 |
|
64 | onVisibleChange?: (visible: boolean, reason: string) => void;
|
65 | onClose?: (reason: string, e: React.MouseEvent) => void;
|
66 | |
67 |
|
68 |
|
69 | placement?: 'top' | 'right' | 'bottom' | 'left';
|
70 | }
|
71 |
|
72 | export default class Drawer extends React.Component<DrawerProps, any> {
|
73 | }
|