Skip to content

Commit

Permalink
Add default color to TextInput
Browse files Browse the repository at this point in the history
  • Loading branch information
sbycrosz committed Dec 11, 2016
1 parent ca7bd7b commit f4211b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/CCInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 } :
Expand Down

0 comments on commit f4211b0

Please sign in to comment.