Skip to content

Commit 22c9a4e

Browse files
committed
Update docs and typescript to include maxDist prop of LongPressHandler
1 parent 4987794 commit 22c9a4e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ Library exports a `State` object that provides a number of constants used to exp
138138
#### `LongPressGestureHandler` extra properties
139139

140140
- `minDurationMs`
141+
- `maxDist`
141142

142143
#### `PanGestureHandler` extra properties
143144

react-native-gesture-handler.d.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export interface NativeViewGestureHandlerProperties
173173
disallowInterruption?: boolean;
174174
onGestureEvent?: (event: NativeViewGestureHandlerGestureEvent) => void;
175175
onHandlerStateChange?: (
176-
event: NativeViewGestureHandlerStateChangeEvent,
176+
event: NativeViewGestureHandlerStateChangeEvent
177177
) => void;
178178
}
179179

@@ -188,6 +188,7 @@ export interface TapGestureHandlerProperties extends GestureHandlerProperties {
188188
export interface LongPressGestureHandlerProperties
189189
extends GestureHandlerProperties {
190190
minDurationMs?: number;
191+
maxDist?: number;
191192
}
192193

193194
export interface PanGestureHandlerProperties extends GestureHandlerProperties {
@@ -218,7 +219,7 @@ export interface RotationGestureHandlerProperties
218219
extends GestureHandlerProperties {
219220
onGestureEvent?: (event: RotationGestureHandlerGestureEvent) => void;
220221
onHandlerStateChange?: (
221-
event: RotationGestureHandlerStateChangeEvent,
222+
event: RotationGestureHandlerStateChangeEvent
222223
) => void;
223224
}
224225

@@ -318,7 +319,7 @@ export class FlatList extends React.Component<
318319

319320
export function gestureHandlerRootHOC(
320321
Component: React.Component,
321-
containerStyles?: any,
322+
containerStyles?: any
322323
): React.Component;
323324

324325
export interface SwipeableProperties {
@@ -333,12 +334,12 @@ export interface SwipeableProperties {
333334
onSwipeableClose?: () => void;
334335
renderLeftActions?: (
335336
progressAnimatedValue: Animated.Value,
336-
dragAnimatedValue: Animated.Value,
337-
) => React.ReactNode
337+
dragAnimatedValue: Animated.Value
338+
) => React.ReactNode;
338339
renderRightActions?: (
339340
progressAnimatedValue: Animated.Value,
340-
dragAnimatedValue: Animated.Value,
341-
) => React.ReactNode
341+
dragAnimatedValue: Animated.Value
342+
) => React.ReactNode;
342343
useNativeAnimations?: boolean;
343344
}
344345

@@ -348,8 +349,8 @@ export class Swipeable extends React.Component<SwipeableProperties> {
348349

349350
export interface DrawerLayoutProperties {
350351
renderNavigationView: (
351-
progressAnimatedValue: Animated.Value,
352-
) => React.ReactNode
352+
progressAnimatedValue: Animated.Value
353+
) => React.ReactNode;
353354
drawerPosition?: 'left' | 'right';
354355
drawerWidth?: number;
355356
drawerBackgroundColor?: string;
@@ -358,7 +359,7 @@ export interface DrawerLayoutProperties {
358359
onDrawerOpen?: () => void;
359360
onDrawerStateChanged?: (
360361
newState: 'Idle' | 'Dragging' | 'Settling',
361-
drawerWillShow: boolean,
362+
drawerWillShow: boolean
362363
) => void;
363364
useNativeAnimations?: boolean;
364365

@@ -370,7 +371,6 @@ export interface DrawerLayoutProperties {
370371
overlayColor?: string;
371372
}
372373

373-
374374
export interface DrawerMovementOptionType {
375375
velocity?: number;
376376
}
@@ -379,4 +379,3 @@ export class DrawerLayout extends React.Component<DrawerLayoutProperties> {
379379
openDrawer: (options: DrawerMovementOptionType) => void;
380380
closeDrawer: (options?: DrawerMovementOptionType) => void;
381381
}
382-

0 commit comments

Comments
 (0)