From 2d904278f289cb5658ff4075f62385f0015d9ca3 Mon Sep 17 00:00:00 2001 From: Dimitris Tzimikas Date: Wed, 2 Jul 2025 11:36:40 +0300 Subject: [PATCH] Introduce prop isDisableTouch In `Rive.tsx` add extra prop `isDisableTouch?: boolean;` to control `disabled` state of `TouchableWithoutFeedback` --- src/Rive.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Rive.tsx b/src/Rive.tsx index e5b95a98..dec228ac 100644 --- a/src/Rive.tsx +++ b/src/Rive.tsx @@ -429,6 +429,7 @@ type RiveProps = { url?: string; style?: StyleProp; testID?: string; + isDisableTouch?: boolean; }; const VIEW_NAME = 'RiveReactNativeView'; @@ -445,6 +446,7 @@ type Props = { layoutScaleFactor?: number; style?: ViewStyle; testID?: string; + isDisableTouch?: boolean; alignment?: Alignment; artboardName?: string; /** @@ -488,6 +490,7 @@ const RiveContainer = React.forwardRef( source, stateMachineName, testID, ++ isDisableTouch, }, ref ) => { @@ -1028,6 +1031,7 @@ const RiveContainer = React.forwardRef( onPressOut={(event: GestureResponderEvent) => touchEnded(event.nativeEvent.locationX, event.nativeEvent.locationY) } + disabled={isDisableTouch} >