Open
Description
Hello, I did:
import { setCustomTextInput } from "react-native-global-props";
const customTextInputProps = {
style: {
//fontFamily: theme.fontFamily.regular,
//color: theme.colors.text,
backgroundColor: "#E0E7FF33",
borderColor: "#E0E7FF",
borderRadius: 5,
borderWidth: 1,
marginVertical: 5,
paddingVertical: 7,
paddingHorizontal: 18,
fontSize: 14,
fontFamily: theme.fontFamily.regular,
//color: "red"
}
};
setCustomTextInput(customTextInputProps);
If I write:
<TextInput value={code} />
The global styles are applied correctly
But if I try to override one property of the style for a particular TextInput, the global styles dissapear, for example writting:
<TextInput
value={code}
style={{color: "red"}}
/>
It only apply the red color, and the rest of the style is gone. No border, no padding, etc.
What I'm doing wrong?
If I do:
<TextInput
value={code}
style={[TextInput.defaultProps.style, {color: "red"}]}
/>
It worked as expected... But then... whats the point using this library?
Can you help me please?
Metadata
Metadata
Assignees
Labels
No labels