diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts index 37c4ce6df43..01bdf53ca1d 100644 --- a/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts +++ b/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.d.ts @@ -11,7 +11,6 @@ import type * as React from 'react'; import {Constructor} from '../../../types/private/Utilities'; import {TimerMixin} from '../../../types/private/TimerMixin'; import {NativeMethods} from '../../../types/public/ReactNativeTypes'; -import {TVParallaxProperties} from '../View/ViewPropTypes'; import {TouchableMixin} from './Touchable'; import {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; @@ -70,22 +69,6 @@ export interface TouchableOpacityProps * Defaults to 0.2 */ activeOpacity?: number | undefined; - - /** - * *(Apple TV only)* Object with properties to control Apple TV parallax effects. - * - * enabled: If true, parallax effects are enabled. Defaults to true. - * shiftDistanceX: Defaults to 2.0. - * shiftDistanceY: Defaults to 2.0. - * tiltAngle: Defaults to 0.05. - * magnification: Defaults to 1.0. - * pressMagnification: Defaults to 1.0. - * pressDuration: Defaults to 0.3. - * pressDelay: Defaults to 0.0. - * - * @platform android - */ - tvParallaxProperties?: TVParallaxProperties | undefined; } /** diff --git a/packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts b/packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts index e0146fc31b3..572a96901d5 100644 --- a/packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +++ b/packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts @@ -42,6 +42,8 @@ export interface TouchableWithoutFeedbackProps AccessibilityProps { children?: React.ReactNode | undefined; + rejectResponderTermination?: boolean | undefined; + /** * Delay in ms, from onPressIn, before onLongPress is called. */ @@ -62,6 +64,12 @@ export interface TouchableWithoutFeedbackProps */ disabled?: boolean | undefined; + /** + * Whether this View should be focusable with a non-touch input device, + * eg. receive focus with a hardware keyboard / TV remote. + */ + focusable?: boolean | undefined; + /** * This defines how far your touch can start away from the button. * This is added to pressRetentionOffset when moving off of the button. diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts index 20ff434f97b..bbd27b0eb3f 100644 --- a/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts +++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts @@ -16,48 +16,6 @@ import {LayoutChangeEvent, PointerEvents} from '../../Types/CoreEventTypes'; import {Touchable} from '../Touchable/Touchable'; import {AccessibilityProps} from './ViewAccessibility'; -export type TVParallaxProperties = { - /** - * If true, parallax effects are enabled. Defaults to true. - */ - enabled?: boolean | undefined; - - /** - * Defaults to 2.0. - */ - shiftDistanceX?: number | undefined; - - /** - * Defaults to 2.0. - */ - shiftDistanceY?: number | undefined; - - /** - * Defaults to 0.05. - */ - tiltAngle?: number | undefined; - - /** - * Defaults to 1.0 - */ - magnification?: number | undefined; - - /** - * Defaults to 1.0 - */ - pressMagnification?: number | undefined; - - /** - * Defaults to 0.3 - */ - pressDuration?: number | undefined; - - /** - * Defaults to 0.3 - */ - pressDelay?: number | undefined; -}; - export interface TVViewPropsIOS { /** * *(Apple TV only)* When set to true, this view will be focusable @@ -74,13 +32,6 @@ export interface TVViewPropsIOS { */ hasTVPreferredFocus?: boolean | undefined; - /** - * *(Apple TV only)* Object with properties to control Apple TV parallax effects. - * - * @platform ios - */ - tvParallaxProperties?: TVParallaxProperties | undefined; - /** * *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. * diff --git a/packages/react-native/types/__typetests__/index.tsx b/packages/react-native/types/__typetests__/index.tsx index 80a615b036c..9f4ec9ed747 100644 --- a/packages/react-native/types/__typetests__/index.tsx +++ b/packages/react-native/types/__typetests__/index.tsx @@ -484,6 +484,31 @@ function TouchableTest() { } } +export class TouchableOpacityTest extends React.Component { + render() { + return ( + <> + + + + + + + ); + } +} + // TouchableNativeFeedbackTest export class TouchableNativeFeedbackTest extends React.Component { onPressButton = (e: GestureResponderEvent) => { @@ -500,6 +525,16 @@ export class TouchableNativeFeedbackTest extends React.Component { Button + + + Button + + + + + Button + +