From cf36eefe2c6802f1fdcba588dac33d5e9d613619 Mon Sep 17 00:00:00 2001 From: clegirar <33428384+clegirar@users.noreply.github.com> Date: Sun, 5 Jan 2025 13:03:05 +0100 Subject: [PATCH] fix: text color for TextInputCustom (#1476) Signed-off-by: clegirar --- packages/components/inputs/TextInputCustom.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/components/inputs/TextInputCustom.tsx b/packages/components/inputs/TextInputCustom.tsx index c1ed96342a..f859502402 100644 --- a/packages/components/inputs/TextInputCustom.tsx +++ b/packages/components/inputs/TextInputCustom.tsx @@ -49,6 +49,8 @@ import { LegacyTertiaryBox } from "../boxes/LegacyTertiaryBox"; import { CustomPressable } from "../buttons/CustomPressable"; import { SpacerColumn, SpacerRow } from "../spacer"; +import { useTheme } from "@/hooks/useTheme"; + // TODO: Refacto TextInputCustom. Too much props export interface TextInputCustomProps @@ -164,6 +166,8 @@ export const TextInputCustom = ({ }); const inputRef = useRef(null); const [hovered, setHovered] = useState(false); + const theme = useTheme(); + // Passing ref to parent since I didn't find a pattern to handle generic argument AND forwardRef useEffect(() => { if (inputRef.current && setRef) { @@ -313,7 +317,11 @@ export const TextInputCustom = ({ onKeyPress={(event) => handleKeyPress({ event, onPressEnter })} placeholderTextColor={neutral77} value={field.value} - style={[styles.textInput, textInputStyle]} + style={[ + { color: theme.textColor }, + styles.textInput, + textInputStyle, + ]} {...restProps} />