Skip to content

Commit

Permalink
fix(textinput): fix disabled styles issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Bien committed Nov 30, 2020
1 parent 1b5e4ca commit 4020923
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const TextInput = ({
style = {},
...otherProps
}: Props) => {
const hasValue = !!(value || defaultValue);
return (
<View style={[styles.wrapper, style]}>
<Border variant='cutout' />
Expand All @@ -38,7 +39,7 @@ const TextInput = ({
{
backgroundColor: disabled ? theme.material : theme.canvas,
},
disabled && value ? text.disabled : text.default,
disabled && hasValue ? text.disabled : text.default,
]}
placeholderTextColor={theme.materialTextDisabled}
defaultValue={defaultValue}
Expand Down

0 comments on commit 4020923

Please sign in to comment.