File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
packages/react-native-gesture-handler/src/components/Pressable Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ let IS_FABRIC: null | boolean = null;
47
47
const Pressable = ( props : PressableProps ) => {
48
48
const {
49
49
ref,
50
- testOnly_pressed,
50
+ testOnly_pressed /** @deprecated testOnly props are deprecated and will be removed in the future. **/ ,
51
51
hitSlop,
52
52
pressRetentionOffset,
53
53
delayHoverIn,
@@ -82,6 +82,9 @@ const Pressable = (props: PressableProps) => {
82
82
// used only if `ref` is undefined
83
83
const fallbackRef = useRef < View > ( null ) ;
84
84
85
+ /**
86
+ * @deprecated testOnly props are deprecated and will be removed in the future.
87
+ */
85
88
const [ pressedState , setPressedState ] = useState ( testOnly_pressed ?? false ) ;
86
89
87
90
const longPressTimeoutRef = useRef < number | null > ( null ) ;
@@ -389,6 +392,9 @@ const Pressable = (props: PressableProps) => {
389
392
rippleColor = { rippleColor }
390
393
rippleRadius = { android_ripple ?. radius ?? undefined }
391
394
style = { [ pointerStyle , styleProp ] }
395
+ /**
396
+ * @deprecated testOnly props are deprecated and will be removed in the future.
397
+ */
392
398
testOnly_onPress = { IS_TEST_ENV ? onPress : undefined }
393
399
testOnly_onPressIn = { IS_TEST_ENV ? onPressIn : undefined }
394
400
testOnly_onPressOut = { IS_TEST_ENV ? onPressOut : undefined }
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ export interface PressableProps
133
133
134
134
/**
135
135
* Used only for documentation or testing (e.g. snapshot testing).
136
+ * @deprecated testOnly props are deprecated and will be removed in the future
136
137
*/
137
138
testOnly_pressed ?: null | boolean ;
138
139
You can’t perform that action at this time.
0 commit comments