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:
parent
9b9df78e28
commit
7fc51c8cea
|
@ -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,
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue