mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
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,
|
||||
|
||||
Reference in New Issue
Block a user