Skip to content

Commit 07ee909

Browse files
author
Andrzej Antoni Kwaśniewski
committed
readd enabled and hitslop
1 parent e5415a2 commit 07ee909

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • packages/react-native-gesture-handler/src/v3/components/Pressable

packages/react-native-gesture-handler/src/v3/components/Pressable/Pressable.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,12 @@ const Pressable = (props: PressableProps) => {
236236
}
237237
onHoverOut?.(gestureToPressableEvent(event));
238238
},
239+
enabled: disabled !== true,
239240
disableReanimated: true,
240241
simultaneousWith,
241242
block,
242243
requireToFail,
244+
hitSlop: appliedHitSlop,
243245
});
244246

245247
const pressAndTouchGesture = useLongPressGesture({
@@ -276,10 +278,12 @@ const Pressable = (props: PressableProps) => {
276278

277279
handleFinalize();
278280
},
281+
enabled: disabled !== true,
279282
disableReanimated: true,
280283
simultaneousWith: simultaneousWith,
281284
block: block,
282285
requireToFail: requireToFail,
286+
hitSlop: appliedHitSlop,
283287
});
284288

285289
// RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events
@@ -316,10 +320,12 @@ const Pressable = (props: PressableProps) => {
316320
handleFinalize();
317321
}
318322
},
323+
enabled: disabled !== true,
319324
disableReanimated: true,
320325
simultaneousWith,
321326
block,
322327
requireToFail,
328+
hitSlop: appliedHitSlop,
323329
});
324330

325331
const gesture = useSimultaneousGestures(

0 commit comments

Comments
 (0)