Skip to content

Commit 7fc51c8

Browse files
erickreutzFacebook Github Bot 4
authored andcommitted
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 #8325 Differential Revision: D3475516 Pulled By: javache fbshipit-source-id: b7e40a0de5e665fc5f41a975650bbba0ec210814
1 parent 9b9df78 commit 7fc51c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Libraries/Components/TextInput/TextInput.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
'use strict';
1313

14+
var ColorPropType = require('ColorPropType');
1415
var DocumentSelectionState = require('DocumentSelectionState');
1516
var EventEmitter = require('EventEmitter');
1617
var NativeMethodsMixin = require('NativeMethodsMixin');
@@ -269,7 +270,7 @@ var TextInput = React.createClass({
269270
/**
270271
* The text color of the placeholder string
271272
*/
272-
placeholderTextColor: PropTypes.string,
273+
placeholderTextColor: ColorPropType,
273274
/**
274275
* If true, the text input obscures the text entered so that sensitive text
275276
* like passwords stay secure. The default value is false.
@@ -278,7 +279,7 @@ var TextInput = React.createClass({
278279
/**
279280
* The highlight (and cursor on ios) color of the text input
280281
*/
281-
selectionColor: PropTypes.string,
282+
selectionColor: ColorPropType,
282283
/**
283284
* See DocumentSelectionState.js, some state that is responsible for
284285
* maintaining selection information for a document
@@ -336,7 +337,7 @@ var TextInput = React.createClass({
336337
* The color of the textInput underline.
337338
* @platform android
338339
*/
339-
underlineColorAndroid: PropTypes.string,
340+
underlineColorAndroid: ColorPropType,
340341
},
341342

342343
/**

0 commit comments

Comments
 (0)