Skip to content

Commit dbf848a

Browse files
committed
fix: patch rn gesture handler
1 parent 218ca60 commit dbf848a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
diff --git a/node_modules/react-native-gesture-handler/lib/typescript/components/GestureButtons.d.ts b/node_modules/react-native-gesture-handler/lib/typescript/components/GestureButtons.d.ts
2+
index 0c10368..b12d5ac 100644
3+
--- a/node_modules/react-native-gesture-handler/lib/typescript/components/GestureButtons.d.ts
4+
+++ b/node_modules/react-native-gesture-handler/lib/typescript/components/GestureButtons.d.ts
5+
@@ -1,4 +1,5 @@
6+
import * as React from 'react';
7+
+import { PropsWithChildren } from 'react';
8+
import { StyleProp, ViewStyle } from 'react-native';
9+
import { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';
10+
export interface RawButtonProps extends NativeViewGestureHandlerProps {
11+
@@ -28,7 +29,7 @@ export declare class BaseButton extends React.Component<BaseButtonProps> {
12+
private onGestureEvent;
13+
render(): JSX.Element;
14+
}
15+
-export declare class RectButton extends React.Component<RectButtonProps> {
16+
+export declare class RectButton extends React.Component<PropsWithChildren<RectButtonProps>> {
17+
static defaultProps: {
18+
activeOpacity: number;
19+
underlayColor: string;
20+
diff --git a/node_modules/react-native-gesture-handler/lib/typescript/components/Swipeable.d.ts b/node_modules/react-native-gesture-handler/lib/typescript/components/Swipeable.d.ts
21+
index 60237c7..95aece3 100644
22+
--- a/node_modules/react-native-gesture-handler/lib/typescript/components/Swipeable.d.ts
23+
+++ b/node_modules/react-native-gesture-handler/lib/typescript/components/Swipeable.d.ts
24+
@@ -1,5 +1,5 @@
25+
import * as React from 'react';
26+
-import { Component } from 'react';
27+
+import { Component, PropsWithChildren } from 'react';
28+
import { Animated, StyleProp, ViewStyle } from 'react-native';
29+
import { PanGestureHandlerProps } from '../handlers/gestureHandlers';
30+
declare type SwipeableExcludes = Exclude<keyof PanGestureHandlerProps, 'onGestureEvent' | 'onHandlerStateChange'>;
31+
@@ -54,7 +54,7 @@ declare type SwipeableState = {
32+
rightOffset?: number;
33+
rowWidth?: number;
34+
};
35+
-export default class Swipeable extends Component<SwipeableProps, SwipeableState> {
36+
+export default class Swipeable extends Component<PropsWithChildren<SwipeableProps>, SwipeableState> {
37+
static defaultProps: {
38+
friction: number;
39+
overshootFriction: number;

0 commit comments

Comments
 (0)