@@ -36,92 +36,93 @@ export type TouchableWithoutFeedbackPropsAndroid = {
3636 touchSoundDisabled ?: ?boolean ,
3737} ;
3838
39+ type TouchableWithoutFeedbackPropsCore = {
40+ children ?: ?React . Node ,
41+ /**
42+ * Delay in ms, from onPressIn, before onLongPress is called.
43+ */
44+ delayLongPress ?: ?number ,
45+ /**
46+ * Delay in ms, from the start of the touch, before onPressIn is called.
47+ */
48+ delayPressIn ?: ?number ,
49+ /**
50+ * Delay in ms, from the release of the touch, before onPressOut is called.
51+ */
52+ delayPressOut ?: ?number ,
53+ /**
54+ * If true, disable all interactions for this component.
55+ */
56+ disabled ?: ?boolean ,
57+ /**
58+ * Whether this View should be focusable with a non-touch input device,
59+ * eg. receive focus with a hardware keyboard / TV remote.
60+ */
61+ focusable ?: ?boolean ,
62+ /**
63+ * This defines how far your touch can start away from the button.
64+ * This is added to pressRetentionOffset when moving off of the button.
65+ * NOTE The touch area never extends past the parent view bounds and
66+ * the Z-index of sibling views always takes precedence if a touch hits
67+ * two overlapping views.
68+ */
69+ hitSlop ?: ?EdgeInsetsOrSizeProp ,
70+ /**
71+ * Used to reference react managed views from native code.
72+ */
73+ id ?: string ,
74+ importantForAccessibility ?: ?( 'auto' | 'yes' | 'no' | 'no-hide-descendants' ) ,
75+ nativeID ?: ?string ,
76+ onAccessibilityAction ?: ?( event : AccessibilityActionEvent ) => unknown ,
77+ /**
78+ * When `accessible` is true (which is the default) this may be called when
79+ * the OS-specific concept of "blur" occurs, meaning the element lost focus.
80+ * Some platforms may not have the concept of blur.
81+ */
82+ onBlur ?: ?( event : BlurEvent ) => unknown ,
83+ /**
84+ * When `accessible` is true (which is the default) this may be called when
85+ * the OS-specific concept of "focus" occurs. Some platforms may not have
86+ * the concept of focus.
87+ */
88+ onFocus ?: ?( event : FocusEvent ) => unknown ,
89+ /**
90+ * Invoked on mount and layout changes with
91+ * {nativeEvent: {layout: {x, y, width, height}}}
92+ */
93+ onLayout ?: ?( event : LayoutChangeEvent ) => unknown ,
94+ onLongPress ?: ?( event : GestureResponderEvent ) => unknown ,
95+ /**
96+ * Called when the touch is released,
97+ * but not if cancelled (e.g. by a scroll that steals the responder lock).
98+ */
99+ onPress ?: ?( event : GestureResponderEvent ) => unknown ,
100+ onPressIn ?: ?( event : GestureResponderEvent ) => unknown ,
101+ onPressOut ?: ?( event : GestureResponderEvent ) => unknown ,
102+ /**
103+ * When the scroll view is disabled, this defines how far your
104+ * touch may move off of the button, before deactivating the button.
105+ * Once deactivated, try moving it back and you'll see that the button
106+ * is once again reactivated! Move it back and forth several times
107+ * while the scroll view is disabled. Ensure you pass in a constant
108+ * to reduce memory allocations.
109+ */
110+ pressRetentionOffset ?: ?EdgeInsetsOrSizeProp ,
111+ rejectResponderTermination ?: ?boolean ,
112+ /**
113+ * Used to locate this view in end-to-end tests.
114+ */
115+ testID ?: ?string ,
116+ /**
117+ * //FIXME: not in doc but available in examples
118+ */
119+ style ?: ?ViewStyleProp ,
120+ } ;
121+
39122/** @build -types emit-as-interface Expo compatibility */
40123export type TouchableWithoutFeedbackProps = Readonly <
41- {
42- children ?: ?React . Node ,
43- /**
44- * Delay in ms, from onPressIn, before onLongPress is called.
45- */
46- delayLongPress ?: ?number ,
47- /**
48- * Delay in ms, from the start of the touch, before onPressIn is called.
49- */
50- delayPressIn ?: ?number ,
51- /**
52- * Delay in ms, from the release of the touch, before onPressOut is called.
53- */
54- delayPressOut ?: ?number ,
55- /**
56- * If true, disable all interactions for this component.
57- */
58- disabled ?: ?boolean ,
59- /**
60- * Whether this View should be focusable with a non-touch input device,
61- * eg. receive focus with a hardware keyboard / TV remote.
62- */
63- focusable ?: ?boolean ,
64- /**
65- * This defines how far your touch can start away from the button.
66- * This is added to pressRetentionOffset when moving off of the button.
67- * NOTE The touch area never extends past the parent view bounds and
68- * the Z-index of sibling views always takes precedence if a touch hits
69- * two overlapping views.
70- */
71- hitSlop ?: ?EdgeInsetsOrSizeProp ,
72- /**
73- * Used to reference react managed views from native code.
74- */
75- id ?: string ,
76- importantForAccessibility ?: ?(
77- 'auto' | 'yes' | 'no' | 'no-hide-descendants'
78- ) ,
79- nativeID ?: ?string ,
80- onAccessibilityAction ?: ?( event : AccessibilityActionEvent ) => unknown ,
81- /**
82- * When `accessible` is true (which is the default) this may be called when
83- * the OS-specific concept of "blur" occurs, meaning the element lost focus.
84- * Some platforms may not have the concept of blur.
85- */
86- onBlur ?: ?( event : BlurEvent ) => unknown ,
87- /**
88- * When `accessible` is true (which is the default) this may be called when
89- * the OS-specific concept of "focus" occurs. Some platforms may not have
90- * the concept of focus.
91- */
92- onFocus ?: ?( event : FocusEvent ) => unknown ,
93- /**
94- * Invoked on mount and layout changes with
95- * {nativeEvent: {layout: {x, y, width, height}}}
96- */
97- onLayout ?: ?( event : LayoutChangeEvent ) => unknown ,
98- onLongPress ?: ?( event : GestureResponderEvent ) => unknown ,
99- /**
100- * Called when the touch is released,
101- * but not if cancelled (e.g. by a scroll that steals the responder lock).
102- */
103- onPress ?: ?( event : GestureResponderEvent ) => unknown ,
104- onPressIn ?: ?( event : GestureResponderEvent ) => unknown ,
105- onPressOut ?: ?( event : GestureResponderEvent ) => unknown ,
106- /**
107- * When the scroll view is disabled, this defines how far your
108- * touch may move off of the button, before deactivating the button.
109- * Once deactivated, try moving it back and you'll see that the button
110- * is once again reactivated! Move it back and forth several times
111- * while the scroll view is disabled. Ensure you pass in a constant
112- * to reduce memory allocations.
113- */
114- pressRetentionOffset ?: ?EdgeInsetsOrSizeProp ,
115- rejectResponderTermination ?: ?boolean ,
116- /**
117- * Used to locate this view in end-to-end tests.
118- */
119- testID ?: ?string ,
120- /**
121- * //FIXME: not in doc but available in examples
122- */
123- style ?: ?ViewStyleProp ,
124- } & TouchableWithoutFeedbackPropsAndroid &
124+ TouchableWithoutFeedbackPropsCore &
125+ TouchableWithoutFeedbackPropsAndroid &
125126 TouchableWithoutFeedbackPropsIOS &
126127 AccessibilityProps ,
127128> ;
0 commit comments