Skip to content

Commit

Permalink
Replace DeprecatedViewPropTypes.style for ViewStyleProp on Integratio…
Browse files Browse the repository at this point in the history
…nTestHarnessTest and InputAccessoryView (facebook#21397)

Summary:
related facebook#21342
Pull Request resolved: facebook#21397

Reviewed By: TheSavior

Differential Revision: D10119623

Pulled By: RSNara

fbshipit-source-id: 16bdb3d5bf90c24b597bbc12fc416a50a0aa2bb1
  • Loading branch information
ronal2do authored and facebook-github-bot committed Oct 1, 2018
1 parent 90091a7 commit 0856936
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
24 changes: 9 additions & 15 deletions IntegrationTests/IntegrationTestHarnessTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,22 @@

'use strict';

/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
* found when Flow v0.54 was deployed. To see the error delete this comment and
* run Flow. */
const requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
const React = require('react');
const PropTypes = require('prop-types');
const ReactNative = require('react-native');
const {Text, View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

class IntegrationTestHarnessTest extends React.Component<
{
shouldThrow?: boolean,
waitOneFrame?: boolean,
},
$FlowFixMeState,
> {
static propTypes = {
shouldThrow: PropTypes.bool,
waitOneFrame: PropTypes.bool,
};
type Props = $ReadOnly<{|
shouldThrow?: boolean,
waitOneFrame?: boolean,
|}>;

type State = {|
done: boolean,
|};

class IntegrationTestHarnessTest extends React.Component<Props, State> {
state = {
done: false,
};
Expand Down
13 changes: 7 additions & 6 deletions Libraries/Components/TextInput/InputAccessoryView.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
'use strict';

const DeprecatedColorPropType = require('DeprecatedColorPropType');
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
const Platform = require('Platform');
const React = require('React');
const StyleSheet = require('StyleSheet');
Expand All @@ -19,6 +18,8 @@ const requireNativeComponent = require('requireNativeComponent');

const RCTInputAccessoryView = requireNativeComponent('RCTInputAccessoryView');

import type {ViewStyleProp} from 'StyleSheet';

/**
* Note: iOS only
*
Expand Down Expand Up @@ -77,16 +78,16 @@ const RCTInputAccessoryView = requireNativeComponent('RCTInputAccessoryView');
* For an example, look at InputAccessoryViewExample.js in RNTester.
*/

type Props = {
type Props = $ReadOnly<{|
+children: React.Node,
/**
* An ID which is used to associate this `InputAccessoryView` to
* specified TextInput(s).
*/
nativeID?: string,
style?: DeprecatedViewPropTypes.style,
backgroundColor?: DeprecatedColorPropType,
};
nativeID?: ?string,
style?: ?ViewStyleProp,
backgroundColor?: ?DeprecatedColorPropType,
|}>;

class InputAccessoryView extends React.Component<Props> {
render(): React.Node {
Expand Down

0 comments on commit 0856936

Please sign in to comment.