mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove PropTypes from ElementProperties (#21350)
Summary: Related to #21342 Pull Request resolved: https://github.com/facebook/react-native/pull/21350 Differential Revision: D10081454 Pulled By: TheSavior fbshipit-source-id: db27a1f23c643b7d6d73136254eff91625419583
This commit is contained in:
committed by
Facebook Github Bot
parent
f3c8027595
commit
c650407fe9
@@ -11,7 +11,6 @@
|
||||
'use strict';
|
||||
|
||||
const BoxInspector = require('BoxInspector');
|
||||
const PropTypes = require('prop-types');
|
||||
const React = require('React');
|
||||
const StyleInspector = require('StyleInspector');
|
||||
const StyleSheet = require('StyleSheet');
|
||||
@@ -24,29 +23,21 @@ const flattenStyle = require('flattenStyle');
|
||||
const mapWithSeparator = require('mapWithSeparator');
|
||||
const openFileInEditor = require('openFileInEditor');
|
||||
|
||||
import type {DangerouslyImpreciseStyleProp} from 'StyleSheet';
|
||||
import type {ViewStyleProp} from 'StyleSheet';
|
||||
|
||||
class ElementProperties extends React.Component<{
|
||||
type Props = $ReadOnly<{|
|
||||
hierarchy: Array<$FlowFixMe>,
|
||||
style?: DangerouslyImpreciseStyleProp,
|
||||
source?: {
|
||||
style?: ?ViewStyleProp,
|
||||
source?: ?{
|
||||
fileName?: string,
|
||||
lineNumber?: number,
|
||||
},
|
||||
}> {
|
||||
static propTypes = {
|
||||
hierarchy: PropTypes.array.isRequired,
|
||||
style: PropTypes.oneOfType([
|
||||
PropTypes.object,
|
||||
PropTypes.array,
|
||||
PropTypes.number,
|
||||
]),
|
||||
source: PropTypes.shape({
|
||||
fileName: PropTypes.string,
|
||||
lineNumber: PropTypes.number,
|
||||
}),
|
||||
};
|
||||
frame?: ?Object,
|
||||
selection?: ?number,
|
||||
setSelection?: (number) => mixed,
|
||||
|}>;
|
||||
|
||||
class ElementProperties extends React.Component<Props> {
|
||||
render() {
|
||||
const style = flattenStyle(this.props.style);
|
||||
// $FlowFixMe found when converting React.createClass to ES6
|
||||
|
||||
Reference in New Issue
Block a user