Skip to content

Commit

Permalink
Parse isPressable from BaseTextProps (facebook#40880)
Browse files Browse the repository at this point in the history
Summary:

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
  • Loading branch information
rozele authored and facebook-github-bot committed Oct 13, 2023
1 parent 95d09d3 commit 586398f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 586398f

Please sign in to comment.