Skip to content

Commit 80066db

Browse files
ronal2dofacebook-github-bot
authored andcommitted
Replace DeprecatedViewPropTypes.style for ViewStyleProp on IntegrationTestHarnessTest and InputAccessoryView (#21397)
Summary: related #21342 Pull Request resolved: #21397 Reviewed By: TheSavior Differential Revision: D10119623 Pulled By: RSNara fbshipit-source-id: 16bdb3d5bf90c24b597bbc12fc416a50a0aa2bb1
1 parent ee74135 commit 80066db

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

IntegrationTests/IntegrationTestHarnessTest.js

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,22 @@
1010

1111
'use strict';
1212

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

23-
class IntegrationTestHarnessTest extends React.Component<
24-
{
25-
shouldThrow?: boolean,
26-
waitOneFrame?: boolean,
27-
},
28-
$FlowFixMeState,
29-
> {
30-
static propTypes = {
31-
shouldThrow: PropTypes.bool,
32-
waitOneFrame: PropTypes.bool,
33-
};
19+
type Props = $ReadOnly<{|
20+
shouldThrow?: boolean,
21+
waitOneFrame?: boolean,
22+
|}>;
23+
24+
type State = {|
25+
done: boolean,
26+
|};
3427

28+
class IntegrationTestHarnessTest extends React.Component<Props, State> {
3529
state = {
3630
done: false,
3731
};

Libraries/Components/TextInput/InputAccessoryView.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
'use strict';
1111

1212
const DeprecatedColorPropType = require('DeprecatedColorPropType');
13-
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
1413
const Platform = require('Platform');
1514
const React = require('React');
1615
const StyleSheet = require('StyleSheet');
@@ -19,6 +18,8 @@ const requireNativeComponent = require('requireNativeComponent');
1918

2019
const RCTInputAccessoryView = requireNativeComponent('RCTInputAccessoryView');
2120

21+
import type {ViewStyleProp} from 'StyleSheet';
22+
2223
/**
2324
* Note: iOS only
2425
*
@@ -77,16 +78,16 @@ const RCTInputAccessoryView = requireNativeComponent('RCTInputAccessoryView');
7778
* For an example, look at InputAccessoryViewExample.js in RNTester.
7879
*/
7980

80-
type Props = {
81+
type Props = $ReadOnly<{|
8182
+children: React.Node,
8283
/**
8384
* An ID which is used to associate this `InputAccessoryView` to
8485
* specified TextInput(s).
8586
*/
86-
nativeID?: string,
87-
style?: DeprecatedViewPropTypes.style,
88-
backgroundColor?: DeprecatedColorPropType,
89-
};
87+
nativeID?: ?string,
88+
style?: ?ViewStyleProp,
89+
backgroundColor?: ?DeprecatedColorPropType,
90+
|}>;
9091

9192
class InputAccessoryView extends React.Component<Props> {
9293
render(): React.Node {

0 commit comments

Comments
 (0)