From f4211b099bc71f189c312edb6f95e153e9a2a13d Mon Sep 17 00:00:00 2001 From: Sam Aryasa Date: Mon, 12 Dec 2016 00:00:46 +0800 Subject: [PATCH] Add default color to TextInput --- src/CCInput.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/CCInput.js b/src/CCInput.js index f01bd222..54606e69 100644 --- a/src/CCInput.js +++ b/src/CCInput.js @@ -4,8 +4,15 @@ import { Text, TextInput, TouchableOpacity, + StyleSheet, } from "react-native"; +const s = StyleSheet.create({ + baseInputStyle: { + color: "black", + }, +}); + export default class CCInput extends Component { static propTypes = { field: PropTypes.string.isRequired, @@ -70,6 +77,7 @@ export default class CCInput extends Component { autoCapitalise="words" autoCorrect={false} style={[ + s.baseInputStyle, inputStyle, ((validColor && status === "valid") ? { color: validColor } : (invalidColor && status === "invalid") ? { color: invalidColor } :