Beginning to reformat propTypes and set redux, intl functions to end of component files
• Beginning: - to reformat propTypes and set redux, intl functions to end of component files
This commit is contained in:
@@ -4,17 +4,7 @@ import { getWindowDimension } from '../../../utils/is_mobile'
|
||||
|
||||
const initialState = getWindowDimension()
|
||||
|
||||
export default class Responsive extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
min: PropTypes.number,
|
||||
max: PropTypes.number,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
min: 0,
|
||||
max: Infinity,
|
||||
}
|
||||
class Responsive extends React.PureComponent {
|
||||
|
||||
state = {
|
||||
width: initialState.width,
|
||||
@@ -48,4 +38,16 @@ export default class Responsive extends React.PureComponent {
|
||||
return shouldRender ? children : null
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Responsive.propTypes = {
|
||||
min: PropTypes.number,
|
||||
max: PropTypes.number,
|
||||
}
|
||||
|
||||
Responsive.defaultProps = {
|
||||
min: 0,
|
||||
max: Infinity,
|
||||
}
|
||||
|
||||
export default Responsive
|
||||
Reference in New Issue
Block a user