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
This commit is contained in:
Eli White
2020-05-26 11:33:00 +02:00
committed by grabbou
parent 29639e7b95
commit 262a3f626d
+4 -4
View File
@@ -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,
],
);