mirror of
https://github.com/status-im/react-native.git
synced 2025-02-21 21:58:18 +00:00
Replace DeprecatedViewPropTypes.style for ViewStyleProp on IntegrationTestHarnessTest and InputAccessoryView (#21397)
Summary: related #21342 Pull Request resolved: https://github.com/facebook/react-native/pull/21397 Reviewed By: TheSavior Differential Revision: D10119623 Pulled By: RSNara fbshipit-source-id: 16bdb3d5bf90c24b597bbc12fc416a50a0aa2bb1
This commit is contained in:
parent
ee74135a46
commit
80066db654
@ -10,28 +10,22 @@
|
|||||||
|
|
||||||
'use strict';
|
'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 requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const PropTypes = require('prop-types');
|
|
||||||
const ReactNative = require('react-native');
|
const ReactNative = require('react-native');
|
||||||
const {Text, View} = ReactNative;
|
const {Text, View} = ReactNative;
|
||||||
const {TestModule} = ReactNative.NativeModules;
|
const {TestModule} = ReactNative.NativeModules;
|
||||||
|
|
||||||
class IntegrationTestHarnessTest extends React.Component<
|
type Props = $ReadOnly<{|
|
||||||
{
|
shouldThrow?: boolean,
|
||||||
shouldThrow?: boolean,
|
waitOneFrame?: boolean,
|
||||||
waitOneFrame?: boolean,
|
|}>;
|
||||||
},
|
|
||||||
$FlowFixMeState,
|
|
||||||
> {
|
|
||||||
static propTypes = {
|
|
||||||
shouldThrow: PropTypes.bool,
|
|
||||||
waitOneFrame: PropTypes.bool,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
type State = {|
|
||||||
|
done: boolean,
|
||||||
|
|};
|
||||||
|
|
||||||
|
class IntegrationTestHarnessTest extends React.Component<Props, State> {
|
||||||
state = {
|
state = {
|
||||||
done: false,
|
done: false,
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||||
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
|
|
||||||
const Platform = require('Platform');
|
const Platform = require('Platform');
|
||||||
const React = require('React');
|
const React = require('React');
|
||||||
const StyleSheet = require('StyleSheet');
|
const StyleSheet = require('StyleSheet');
|
||||||
@ -19,6 +18,8 @@ const requireNativeComponent = require('requireNativeComponent');
|
|||||||
|
|
||||||
const RCTInputAccessoryView = requireNativeComponent('RCTInputAccessoryView');
|
const RCTInputAccessoryView = requireNativeComponent('RCTInputAccessoryView');
|
||||||
|
|
||||||
|
import type {ViewStyleProp} from 'StyleSheet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: iOS only
|
* Note: iOS only
|
||||||
*
|
*
|
||||||
@ -77,16 +78,16 @@ const RCTInputAccessoryView = requireNativeComponent('RCTInputAccessoryView');
|
|||||||
* For an example, look at InputAccessoryViewExample.js in RNTester.
|
* For an example, look at InputAccessoryViewExample.js in RNTester.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type Props = {
|
type Props = $ReadOnly<{|
|
||||||
+children: React.Node,
|
+children: React.Node,
|
||||||
/**
|
/**
|
||||||
* An ID which is used to associate this `InputAccessoryView` to
|
* An ID which is used to associate this `InputAccessoryView` to
|
||||||
* specified TextInput(s).
|
* specified TextInput(s).
|
||||||
*/
|
*/
|
||||||
nativeID?: string,
|
nativeID?: ?string,
|
||||||
style?: DeprecatedViewPropTypes.style,
|
style?: ?ViewStyleProp,
|
||||||
backgroundColor?: DeprecatedColorPropType,
|
backgroundColor?: ?DeprecatedColorPropType,
|
||||||
};
|
|}>;
|
||||||
|
|
||||||
class InputAccessoryView extends React.Component<Props> {
|
class InputAccessoryView extends React.Component<Props> {
|
||||||
render(): React.Node {
|
render(): React.Node {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user