From 262a3f626dacc1a118349e30f86ef32cf7b8f9a3 Mon Sep 17 00:00:00 2001 From: Eli White Date: Wed, 13 May 2020 12:57:08 -0700 Subject: [PATCH] Pressable: Rename pressRectOffset to pressRetentionOffset to be consistent with other touchables Summary: Text and the other Touchables have this prop called pressRetentionOffset. Pressable should be consistent with that. Changelog: [Breaking][General]: Pressable: Rename pressRectOffset to pressRetentionOffset to be consistent with other touchables Reviewed By: yungsters Differential Revision: D21552255 fbshipit-source-id: 31e64bad9e48ac98e4934dd2f4c0a7f526de5cb6 --- Libraries/Components/Pressable/Pressable.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Libraries/Components/Pressable/Pressable.js b/Libraries/Components/Pressable/Pressable.js index 963933d13ca..e86140b60f5 100644 --- a/Libraries/Components/Pressable/Pressable.js +++ b/Libraries/Components/Pressable/Pressable.js @@ -78,7 +78,7 @@ type Props = $ReadOnly<{| * Additional distance outside of this view in which a touch is considered a * press before `onPressOut` is triggered. */ - pressRectOffset?: ?RectOrSize, + pressRetentionOffset?: ?RectOrSize, /** * Called when this view's layout changes. @@ -149,7 +149,7 @@ function Pressable(props: Props, forwardedRef): React.Node { onPress, onPressIn, onPressOut, - pressRectOffset, + pressRetentionOffset, style, testOnly_pressed, ...restProps @@ -168,7 +168,7 @@ function Pressable(props: Props, forwardedRef): React.Node { () => ({ disabled, hitSlop, - pressRectOffset, + pressRectOffset: pressRetentionOffset, android_disableSound, delayLongPress, onLongPress, @@ -203,7 +203,7 @@ function Pressable(props: Props, forwardedRef): React.Node { onPress, onPressIn, onPressOut, - pressRectOffset, + pressRetentionOffset, setPressed, ], );