forked from software-mansion/react-native-gesture-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawerLayout.d.ts
More file actions
51 lines (42 loc) · 1.58 KB
/
DrawerLayout.d.ts
File metadata and controls
51 lines (42 loc) · 1.58 KB
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
declare module 'react-native-gesture-handler/DrawerLayout' {
import * as React from 'react'
import { Animated, StatusBarAnimation, StyleProp, ViewStyle } from 'react-native';
export type DrawerPosition = 'left' | 'right';
export type DrawerState = 'Idle' | 'Dragging' | 'Settling';
export type DrawerType = 'front' | 'back' | 'slide';
export type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';
export type DrawerKeyboardDismissMode = 'none' | 'on-drag';
export interface DrawerLayoutProperties {
renderNavigationView: (
progressAnimatedValue: Animated.Value
) => React.ReactNode;
drawerPosition?: DrawerPosition;
drawerWidth?: number;
drawerBackgroundColor?: string;
drawerLockMode?: DrawerLockMode;
keyboardDismissMode?: DrawerKeyboardDismissMode;
onDrawerClose?: () => void;
onDrawerOpen?: () => void;
onDrawerStateChanged?: (
newState: DrawerState,
drawerWillShow: boolean
) => void;
useNativeAnimations?: boolean;
drawerType?: DrawerType;
edgeWidth?: number;
minSwipeDistance?: number;
hideStatusBar?: boolean;
statusBarAnimation?: StatusBarAnimation;
overlayColor?: string;
contentContainerStyle?: StyleProp<ViewStyle>;
enableTrackpadTwoFingerGesture?: boolean;
}
interface DrawerMovementOptionType {
velocity?: number;
speed?: number;
}
export default class DrawerLayout extends React.Component<DrawerLayoutProperties> {
openDrawer: (options?: DrawerMovementOptionType) => void;
closeDrawer: (options?: DrawerMovementOptionType) => void;
}
}