Skip to content

Commit bc57056

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Refactor AndroidTextInput.AndroidTextInput.color prop to use SharedColor 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
1 parent 24d9126 commit bc57056

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ folly::dynamic AndroidTextInputProps::getDynamic() const {
332332
props["textShadowOffset"] = toDynamic(textShadowOffset);
333333
props["lineHeight"] = lineHeight;
334334
props["textTransform"] = textTransform;
335-
props["color"] = color;
335+
props["color"] = toDynamic(color);
336336
props["letterSpacing"] = letterSpacing;
337337
props["fontSize"] = fontSize;
338338
props["textAlign"] = textAlign;

ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class AndroidTextInputProps final : public ViewProps, public BaseTextProps {
141141
const AndroidTextInputTextShadowOffsetStruct textShadowOffset{};
142142
const Float lineHeight{0.0};
143143
const std::string textTransform{};
144-
const int color{0};
144+
const SharedColor color{0};
145145
const Float letterSpacing{0.0};
146146
const Float fontSize{0.0};
147147
const std::string textAlign{};

0 commit comments

Comments
 (0)