diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index dadf2a16379a9f..bc4fa226836d33 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -45,11 +45,22 @@ const Text: React.AbstractComponent< ...restProps } = props; + const [isHighlighted, setHighlighted] = useState(false); + + const _disabled = + restProps.disabled != null + ? restProps.disabled + : props.accessibilityState?.disabled; + const _accessibilityState = + _disabled !== props.accessibilityState?.disabled + ? {...props.accessibilityState, disabled: _disabled} + : props.accessibilityState; + const isPressable = (onPress != null || onLongPress != null || onStartShouldSetResponder != null) && - restProps.disabled !== true; + _disabled !== true; const initialized = useLazyInitialization(isPressable); const config = useMemo( @@ -167,7 +178,9 @@ const Text: React.AbstractComponent<