Skip to content

Commit 9678873

Browse files
authored
TextField - fix color default value (#2818)
1 parent 93f2b9f commit 9678873

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/components/textField/Input.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
import React, {useContext, useMemo} from 'react';
22
import {TextInput as RNTextInput, StyleSheet, Platform} from 'react-native';
33
import {Constants, ForwardRefInjectedProps} from '../../commons/new';
4-
import {InputProps, ColorType} from './types';
4+
import {InputProps} from './types';
55
import {getColorByState} from './Presenter';
66
import {Colors} from '../../style';
77
import FieldContext from './FieldContext';
88
import useImperativeInputHandle from './useImperativeInputHandle';
99

10-
const DEFAULT_INPUT_COLOR: ColorType = {
11-
default: Colors.$textDefault,
12-
disabled: Colors.$textDisabled,
13-
readonly: Colors.$textNeutral
14-
};
15-
1610
const Input = ({
1711
// (!) extract flex prop to avoid passing them on Android
1812
// TODO: extract alignment (top, right, ...) props till we manage to exclude them from typings
@@ -30,7 +24,11 @@ const Input = ({
3024
/* eslint-enable */
3125
style,
3226
hint,
33-
color = DEFAULT_INPUT_COLOR,
27+
color = {
28+
default: Colors.$textDefault,
29+
disabled: Colors.$textDisabled,
30+
readonly: Colors.$textNeutral
31+
},
3432
forwardedRef,
3533
formatter,
3634
useGestureHandlerInput,

0 commit comments

Comments
 (0)