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

24 lines
538 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;
return (
<div className={classnames('modal__body', {
'modal__body--no-scroll': noScroll
}, className)} {...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;