insomnia/app/ui/components/base/ModalBody.js
Gregory Schier b198e6170b React performance sweep (#96)
* Removed some unnecessary rendering

* Only PureComponents and some other stuff

* Removed all functional components

* Only deal with nunjucks marks

* Remove ref assign functions in modals

* Lots of tweaks

* A bit snappier

* A bit snappier
2017-02-28 13:32:23 -08:00

22 lines
479 B
JavaScript

import React, {PureComponent, PropTypes} from 'react';
import classnames from 'classnames';
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>
);
}
}
ModalBody.propTypes = {
noScroll: PropTypes.bool
};
export default ModalBody;