Skip to content

Commit 83754e0

Browse files
authored
fix: Support react-native-gesture-handler 3.x types (#553)
`ActiveItemPortal`'s `gesture` prop used the `ManualGesture` type, which `react-native-gesture-handler` 3.x no longer exports (it became `LegacyManualGesture`). Switched it to `GestureType`, which is exported by both 2.x and 3.x and matches the type already used by `ItemContextType.gesture` (where this prop is forwarded). This keeps the library's types resolvable on gesture-handler 2.x **and** 3.x under the existing `>=2.0.0` peer range. Type-only change — no runtime behavior change.
1 parent c83b016 commit 83754e0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-native-sortables/src/components/shared/DraggableView/ActiveItemPortal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useCallback, useEffect, useRef } from 'react';
2-
import type { ManualGesture } from 'react-native-gesture-handler';
2+
import type { GestureType } from 'react-native-gesture-handler';
33
import { runOnJS, useAnimatedReaction } from 'react-native-reanimated';
44

55
import { useStableCallback } from '../../../hooks';
@@ -22,7 +22,7 @@ type ActiveItemPortalProps = Pick<
2222
'activationAnimationProgress' | 'baseStyle' | 'isActive' | 'itemKey'
2323
> & {
2424
commonValuesContext: CommonValuesContextType;
25-
gesture: ManualGesture;
25+
gesture: GestureType;
2626
onTeleport: (isTeleported: boolean) => void;
2727
};
2828

0 commit comments

Comments
 (0)