mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 14:18:23 +00:00
Remove PropTypes from InspectorOverlay (#21345)
Summary: Related to #21342 Pull Request resolved: https://github.com/facebook/react-native/pull/21345 Differential Revision: D10081976 Pulled By: TheSavior fbshipit-source-id: d6a905704fc5c2f10a6a8552f04e9c3feaeb147b
This commit is contained in:
parent
8487e8fc45
commit
9f8fc8f1eb
@ -12,33 +12,29 @@
|
|||||||
|
|
||||||
const Dimensions = require('Dimensions');
|
const Dimensions = require('Dimensions');
|
||||||
const ElementBox = require('ElementBox');
|
const ElementBox = require('ElementBox');
|
||||||
const PropTypes = require('prop-types');
|
|
||||||
const React = require('React');
|
const React = require('React');
|
||||||
const StyleSheet = require('StyleSheet');
|
const StyleSheet = require('StyleSheet');
|
||||||
const UIManager = require('UIManager');
|
const UIManager = require('UIManager');
|
||||||
const View = require('View');
|
const View = require('View');
|
||||||
|
|
||||||
|
import type {ViewStyleProp} from 'StyleSheet';
|
||||||
|
|
||||||
type EventLike = {
|
type EventLike = {
|
||||||
nativeEvent: Object,
|
nativeEvent: Object,
|
||||||
};
|
};
|
||||||
|
|
||||||
class InspectorOverlay extends React.Component<{
|
type Inspected = $ReadOnly<{|
|
||||||
inspected?: {
|
frame?: Object,
|
||||||
frame?: Object,
|
style?: ViewStyleProp,
|
||||||
style?: any,
|
|}>;
|
||||||
},
|
|
||||||
inspectedViewTag?: number,
|
|
||||||
onTouchViewTag: (tag: number, frame: Object, pointerY: number) => void,
|
|
||||||
}> {
|
|
||||||
static propTypes = {
|
|
||||||
inspected: PropTypes.shape({
|
|
||||||
frame: PropTypes.object,
|
|
||||||
style: PropTypes.any,
|
|
||||||
}),
|
|
||||||
inspectedViewTag: PropTypes.number,
|
|
||||||
onTouchViewTag: PropTypes.func.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
type Props = $ReadOnly<{|
|
||||||
|
inspected?: Inspected,
|
||||||
|
inspectedViewTag?: ?number,
|
||||||
|
onTouchViewTag: (tag: number, frame: Object, pointerY: number) => mixed,
|
||||||
|
|}>;
|
||||||
|
|
||||||
|
class InspectorOverlay extends React.Component<Props> {
|
||||||
findViewForTouchEvent = (e: EventLike) => {
|
findViewForTouchEvent = (e: EventLike) => {
|
||||||
const {locationX, locationY} = e.nativeEvent.touches[0];
|
const {locationX, locationY} = e.nativeEvent.touches[0];
|
||||||
UIManager.findSubviewIn(
|
UIManager.findSubviewIn(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user