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

29 lines
601 B
JavaScript
Raw Normal View History

2017-08-10 01:56:27 +00:00
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
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;