diff --git a/ReactCommon/fabric/attributedstring/TextAttributes.h b/ReactCommon/fabric/attributedstring/TextAttributes.h index c474e7e2a..584387bf5 100644 --- a/ReactCommon/fabric/attributedstring/TextAttributes.h +++ b/ReactCommon/fabric/attributedstring/TextAttributes.h @@ -57,7 +57,8 @@ public: folly::Optional textDecorationLinePattern {}; // Shadow - folly::Optional textShadowOffset {}; + // TODO: Use `Point` type instead of `Size` for `textShadowOffset` attribute. + folly::Optional textShadowOffset {}; Float textShadowRadius {std::numeric_limits::quiet_NaN()}; SharedColor textShadowColor {nullptr}; diff --git a/ReactCommon/fabric/textlayoutmanager/RCTAttributedTextUtils.mm b/ReactCommon/fabric/textlayoutmanager/RCTAttributedTextUtils.mm index 11d4db50c..542b7859f 100644 --- a/ReactCommon/fabric/textlayoutmanager/RCTAttributedTextUtils.mm +++ b/ReactCommon/fabric/textlayoutmanager/RCTAttributedTextUtils.mm @@ -154,7 +154,7 @@ static NSDictionary *RCTNSTextAttributesFromTextAttri if (textAttributes.textShadowOffset.hasValue()) { auto textShadowOffset = textAttributes.textShadowOffset.value(); NSShadow *shadow = [NSShadow new]; - shadow.shadowOffset = CGSize {textShadowOffset.x, textShadowOffset.y}; + shadow.shadowOffset = CGSize {textShadowOffset.width, textShadowOffset.height}; shadow.shadowBlurRadius = textAttributes.textShadowRadius; shadow.shadowColor = RCTUIColorFromSharedColor(textAttributes.textShadowColor); attributes[NSShadowAttributeName] = shadow;