mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
@@ -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,
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user