diff --git a/lib/TextField.js b/lib/TextField.js index d42523a..56d765e 100644 --- a/lib/TextField.js +++ b/lib/TextField.js @@ -1,6 +1,6 @@ 'use strict'; import React, {Component, PropTypes} from "react"; -import {View, TextInput, StyleSheet} from "react-native"; +import {View, TextInput, Text, StyleSheet} from "react-native"; import Underline from './Underline'; import FloatingLabel from './FloatingLabel'; @@ -61,16 +61,26 @@ export default class TextField extends Component { multiline, ...props } = this.props; + + const textInputComposedStyles = [dense ? styles.denseTextInput : styles.textInput, { + color: textColor + }, (this.state.isFocused && textFocusColor) ? { + color: textFocusColor + } : {}, (!this.state.isFocused && textBlurColor) ? { + color: textBlurColor + } : {}, inputStyle, this.state.height ? {height: this.state.height} : {}] + return ( + + { + this.props.symbol && this.props.value ? + {this.props.symbol} + : null + } + { this.setState({isFocused: true}); @@ -98,6 +108,8 @@ export default class TextField extends Component { value={this.state.text} {...props} /> + +