Parse isPressable from BaseTextProps (#40880)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40880

The isPressable prop was previously added to TextAttributes. It also needs to be parsed from RawProps in BaseTextProps for platforms to use it.

## Changelog

[General][Internal]

Reviewed By: javache

Differential Revision: D50235306

fbshipit-source-id: 101aded2af5889c739ed06af7511bd34a2683dfc
This commit is contained in:
Eric Rozell
2023-10-13 06:19:44 -07:00
committed by Facebook GitHub Bot
parent 95d09d32fe
commit c323dbbcbe
@@ -165,6 +165,12 @@ static TextAttributes convertRawProp(
"isHighlighted",
sourceTextAttributes.isHighlighted,
defaultTextAttributes.isHighlighted);
textAttributes.isPressable = convertRawProp(
context,
rawProps,
"isPressable",
sourceTextAttributes.isPressable,
defaultTextAttributes.isPressable);
// In general, we want this class to access props in the same order
// that ViewProps accesses them in, so that RawPropParser can optimize
@@ -294,6 +300,8 @@ void BaseTextProps::setProp(
defaults, value, textAttributes, textShadowColor, "textShadowColor");
REBUILD_FIELD_SWITCH_CASE(
defaults, value, textAttributes, isHighlighted, "isHighlighted");
REBUILD_FIELD_SWITCH_CASE(
defaults, value, textAttributes, isPressable, "isPressable");
REBUILD_FIELD_SWITCH_CASE(
defaults,
value,