-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
96 lines (78 loc) · 2.18 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
declare module "react-drag-mobile-drawer" {
interface DrawerProps {
/**
* Block closing if set to false. Default is true.
*/
allowClose?: boolean;
/**
* The children elements of the drawer.
* This is a required property.
*/
children: React.ReactNode;
/**
* Class name to be applied to the drawer container element.
*/
containerElementClass?: string;
/**
* Controls the container's opacity (default is 0.6).
*/
containerOpacity?: number;
/**
* The direction in which to translate the drawer.
*/
direction?: string;
/**
* Disables the backdrop/background and allows for background scrolling.
* Note: There appears to be a bug with WebKit browsers (Safari) which causes this feature to not work as expected.
*/
disableBackDrop?: boolean;
/**
* Skip applying internal event listeners to the DOM.
*/
dontApplyListeners?: boolean;
/**
* Function to get the container (overlay) ref.
*/
getContainerRef?: () => React.RefObject<HTMLDivElement>;
/**
* Function to get the modal (draggable element) ref.
*/
getModalRef?: () => React.RefObject<HTMLDivElement>;
/**
* Function to detect when the drawer is at the top of the viewport.
*/
inViewportChange?: () => void;
/**
* Class name to be applied to the top modal element.
*/
modalElementClass?: string;
/**
* Notify the consumer if the drawer will close at touch release.
*/
notifyWillClose?: () => void;
/**
* Invoked on drag.
*/
onDrag?: () => void;
/**
* Invoked when the drawer is focused.
*/
onOpen?: () => void;
/**
* Indicates whether the drawer is open.
* This is a required property.
*/
open: boolean;
/**
* Invoked when a request to close the drawer is made.
* This is a required property.
*/
onRequestClose: () => void;
/**
* Blocks scrolls on the specified element if you're not using body scrolling.
*/
parentElement?: React.RefObject<HTMLElement>;
}
class Drawer extends React.Component<DrawerProps> {}
export { Drawer };
}