use ColorPropType everywhere there is a color prop on TextInput

Summary:
If using colors that are not strings react native would warn you of the problem. I made some changes so color props use `ColorPropType` instead of `PropTypes.string`.
Closes https://github.com/facebook/react-native/pull/8325

Differential Revision: D3475516

Pulled By: javache

fbshipit-source-id: b7e40a0de5e665fc5f41a975650bbba0ec210814
This commit is contained in:
Eric Kreutzer 2016-06-23 03:06:36 -07:00 committed by Facebook Github Bot 4
parent 9b9df78e28
commit 7fc51c8cea
1 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,7 @@
*/
'use strict';
var ColorPropType = require('ColorPropType');
var DocumentSelectionState = require('DocumentSelectionState');
var EventEmitter = require('EventEmitter');
var NativeMethodsMixin = require('NativeMethodsMixin');
@ -269,7 +270,7 @@ var TextInput = React.createClass({
/**
* The text color of the placeholder string
*/
placeholderTextColor: PropTypes.string,
placeholderTextColor: ColorPropType,
/**
* If true, the text input obscures the text entered so that sensitive text
* like passwords stay secure. The default value is false.
@ -278,7 +279,7 @@ var TextInput = React.createClass({
/**
* The highlight (and cursor on ios) color of the text input
*/
selectionColor: PropTypes.string,
selectionColor: ColorPropType,
/**
* See DocumentSelectionState.js, some state that is responsible for
* maintaining selection information for a document
@ -336,7 +337,7 @@ var TextInput = React.createClass({
* The color of the textInput underline.
* @platform android
*/
underlineColorAndroid: PropTypes.string,
underlineColorAndroid: ColorPropType,
},
/**