From a43fd60e18aff9ee6bcaf8ec576adb8678d5bcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Tue, 18 Feb 2020 13:51:34 -0800 Subject: [PATCH] Fix backgroundColor typing. (#28105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: TextInput’s `InputAccessoryView` was using a [deprecated] prop-type as a Flow type, which TheSavior asked me to fix [here](https://github.com/alloy/rn2dts/commit/6ba4b28a22d8c0bd346996d78743016eaae707e1#r37343692). ## Changelog [iOS] [Fixed] - Fixes the `InputAccessoryView.backgroundColor` prop’s typing to use `ColorValue`. Pull Request resolved: https://github.com/facebook/react-native/pull/28105 Test Plan: Passes: ```bash yarn flow-check-ios ``` Differential Revision: D19956401 Pulled By: TheSavior fbshipit-source-id: 0c16f292b0143e83235a23712a0a7a11b8317f4e --- Libraries/Components/TextInput/InputAccessoryView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/TextInput/InputAccessoryView.js b/Libraries/Components/TextInput/InputAccessoryView.js index 67d314ca5a6c30..b35920d5bcb23d 100644 --- a/Libraries/Components/TextInput/InputAccessoryView.js +++ b/Libraries/Components/TextInput/InputAccessoryView.js @@ -10,7 +10,6 @@ 'use strict'; -const DeprecatedColorPropType = require('../../DeprecatedPropTypes/DeprecatedColorPropType'); const Platform = require('../../Utilities/Platform'); const React = require('react'); const StyleSheet = require('../../StyleSheet/StyleSheet'); @@ -18,6 +17,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet'); import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; +import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; /** * Note: iOS only @@ -85,7 +85,7 @@ type Props = $ReadOnly<{| */ nativeID?: ?string, style?: ?ViewStyleProp, - backgroundColor?: ?DeprecatedColorPropType, + backgroundColor?: ?ColorValue, |}>; class InputAccessoryView extends React.Component {