Continuing updating the reformatting of propTypes and set redux, intl functions to end of component
Continuing updating the reformatting of propTypes and set redux, intl functions to end of component
This commit is contained in:
@@ -8,28 +8,8 @@ import Heading from '../heading'
|
||||
|
||||
const cx = classNames.bind(_s)
|
||||
|
||||
const messages = defineMessages({
|
||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||
})
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class ModalLayout extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
title: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
onClose: PropTypes.func.isRequired,
|
||||
width: PropTypes.number,
|
||||
hideClose: PropTypes.bool,
|
||||
noPadding: PropTypes.bool,
|
||||
isXS: PropTypes.bool,
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
width: 600,
|
||||
}
|
||||
|
||||
onHandleCloseModal = () => {
|
||||
this.props.onClose()
|
||||
}
|
||||
@@ -81,4 +61,24 @@ class ModalLayout extends React.PureComponent {
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||
})
|
||||
|
||||
ModalLayout.propTypes = {
|
||||
title: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
onClose: PropTypes.func.isRequired,
|
||||
width: PropTypes.number,
|
||||
hideClose: PropTypes.bool,
|
||||
noPadding: PropTypes.bool,
|
||||
isXS: PropTypes.bool,
|
||||
}
|
||||
|
||||
ModalLayout.defaultProps = {
|
||||
width: 600,
|
||||
}
|
||||
|
||||
export default injectIntl(ModalLayout)
|
||||
Reference in New Issue
Block a user