2017-08-10 01:56:27 +00:00
|
|
|
import React, {PureComponent} from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2016-07-16 02:06:10 +00:00
|
|
|
import classnames from 'classnames';
|
2016-04-15 05:23:54 +00:00
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
class ModalBody extends PureComponent {
|
|
|
|
render () {
|
|
|
|
const {className, children, noScroll, ...props} = this.props;
|
2017-03-12 00:31:23 +00:00
|
|
|
const classes = classnames(
|
|
|
|
className,
|
|
|
|
'modal__body',
|
|
|
|
{'modal__body--no-scroll': noScroll}
|
|
|
|
);
|
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
return (
|
2017-03-12 00:31:23 +00:00
|
|
|
<div className={classes} {...props}>
|
2017-02-28 21:32:23 +00:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2016-04-15 05:23:54 +00:00
|
|
|
|
2016-08-15 17:04:36 +00:00
|
|
|
ModalBody.propTypes = {
|
2017-03-08 05:52:17 +00:00
|
|
|
noScroll: PropTypes.bool,
|
|
|
|
className: PropTypes.string,
|
|
|
|
children: PropTypes.node
|
2016-08-15 17:04:36 +00:00
|
|
|
};
|
|
|
|
|
2016-04-15 05:23:54 +00:00
|
|
|
export default ModalBody;
|