insomnia/app/ui/components/base/modal-body.js

28 lines
576 B
JavaScript
Raw Normal View History

import React, {PureComponent, PropTypes} from 'react';
import classnames from 'classnames';
2016-04-15 05:23:54 +00:00
class ModalBody extends PureComponent {
render () {
const {className, children, noScroll, ...props} = this.props;
const classes = classnames(
className,
'modal__body',
{'modal__body--no-scroll': noScroll}
);
return (
<div className={classes} {...props}>
{children}
</div>
);
}
}
2016-04-15 05:23:54 +00:00
ModalBody.propTypes = {
noScroll: PropTypes.bool,
className: PropTypes.string,
children: PropTypes.node
};
2016-04-15 05:23:54 +00:00
export default ModalBody;