Skip to content

Commit

Permalink
Refactor AndroidTextInput.AndroidTextInput.color prop to use SharedCo…
Browse files Browse the repository at this point in the history
…lor instead of int

Summary:
This diff refactors the AndroidTextInput.AndroidTextInput.color prop to use SharedColor instead of int

The purpose of this change is avoid a crash when using PlatformColor on TextInput
changelog: [intenral] internal

Reviewed By: JoshuaGross

Differential Revision: D29810595

fbshipit-source-id: 2a5a9c5ae66e8d5de8adb1c89ea62489190a91ee
  • Loading branch information
mdvacca authored and facebook-github-bot committed Jul 21, 2021
1 parent 24d9126 commit bc57056
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ folly::dynamic AndroidTextInputProps::getDynamic() const {
props["textShadowOffset"] = toDynamic(textShadowOffset);
props["lineHeight"] = lineHeight;
props["textTransform"] = textTransform;
props["color"] = color;
props["color"] = toDynamic(color);
props["letterSpacing"] = letterSpacing;
props["fontSize"] = fontSize;
props["textAlign"] = textAlign;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class AndroidTextInputProps final : public ViewProps, public BaseTextProps {
const AndroidTextInputTextShadowOffsetStruct textShadowOffset{};
const Float lineHeight{0.0};
const std::string textTransform{};
const int color{0};
const SharedColor color{0};
const Float letterSpacing{0.0};
const Float fontSize{0.0};
const std::string textAlign{};
Expand Down

0 comments on commit bc57056

Please sign in to comment.