Skip to content

Commit

Permalink
Merge branch 'main' into fix/font-weight-wallet-manager-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
clegirar authored Jan 6, 2025
2 parents 3ee9c46 + cf36eef commit a9b4492
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/components/inputs/TextInputCustom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends FieldValues>
Expand Down Expand Up @@ -164,6 +166,8 @@ export const TextInputCustom = <T extends FieldValues>({
});
const inputRef = useRef<TextInput>(null);
const [hovered, setHovered] = useState(false);
const theme = useTheme();

// Passing ref to parent since I didn't find a pattern to handle generic argument <T extends FieldValues> AND forwardRef
useEffect(() => {
if (inputRef.current && setRef) {
Expand Down Expand Up @@ -313,7 +317,11 @@ export const TextInputCustom = <T extends FieldValues>({
onKeyPress={(event) => handleKeyPress({ event, onPressEnter })}
placeholderTextColor={neutral77}
value={field.value}
style={[styles.textInput, textInputStyle]}
style={[
{ color: theme.textColor },
styles.textInput,
textInputStyle,
]}
{...restProps}
/>
</View>
Expand Down

0 comments on commit a9b4492

Please sign in to comment.