1
1
/* eslint-disable react/no-multi-comp */
2
+ /* eslint-disable react/prop-types */
2
3
/* eslint-disable react/require-default-props */
3
4
/* eslint-disable react/no-find-dom-node */
4
5
5
6
import React , { Children , Component } from 'react'
6
- import PropTypes from 'prop-types'
7
7
import ReactDOM from 'react-dom'
8
8
import invariant from 'invariant'
9
9
import { debounce , throttle } from 'throttle-debounce'
@@ -38,7 +38,6 @@ class ReferenceWrapper extends Component {
38
38
return Children . only ( this . props . children )
39
39
}
40
40
}
41
- ReferenceWrapper . propTypes = { children : PropTypes . element . isRequired }
42
41
43
42
function Placeholder ( { className, style } ) {
44
43
// Lets create the props for the temp element.
@@ -60,10 +59,6 @@ function Placeholder({ className, style }) {
60
59
return < div { ...phProps } />
61
60
}
62
61
Placeholder . displayName = 'SizeMePlaceholder'
63
- Placeholder . propTypes = {
64
- className : PropTypes . string ,
65
- style : PropTypes . object ,
66
- }
67
62
68
63
/**
69
64
* As we need to maintain a ref on the root node that is rendered within our
@@ -112,19 +107,6 @@ const renderWrapper = WrappedComponent => {
112
107
WrappedComponent ,
113
108
) } )`
114
109
115
- SizeMeRenderer . propTypes = {
116
- explicitRef : PropTypes . func . isRequired ,
117
- className : PropTypes . string ,
118
- style : PropTypes . object , // eslint-disable-line react/forbid-prop-types
119
- size : PropTypes . shape ( {
120
- width : PropTypes . number , // eslint-disable-line react/no-unused-prop-types
121
- height : PropTypes . number , // eslint-disable-line react/no-unused-prop-types
122
- position : PropTypes . object ,
123
- } ) ,
124
- disablePlaceholder : PropTypes . bool ,
125
- onSize : PropTypes . func ,
126
- }
127
-
128
110
return SizeMeRenderer
129
111
}
130
112
@@ -178,10 +160,6 @@ function withSize(config = defaultConfig) {
178
160
class SizeAwareComponent extends React . Component {
179
161
static displayName = `SizeMe(${ getDisplayName ( WrappedComponent ) } )`
180
162
181
- static propTypes = {
182
- onSize : PropTypes . func ,
183
- }
184
-
185
163
domEl = null
186
164
187
165
state = {
0 commit comments