fix base modal prop passed to ReactModal (#2165)

This commit is contained in:
Benjamin Wheeler 2018-10-10 14:08:59 -04:00 committed by GitHub
parent 69299d3ef9
commit 8b222f0466
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,11 @@ class Modal extends React.Component {
return (
<ReactModal
appElement={document.getElementById('app')}
bodyOpenClassName={this.props.useStandardSizes ? classNames('overflow-hidden') : null}
// bodyOpenClassName can be blank string, but must not be null here; a null value causes
// an error, because ReactModal does not correctly handle the case of a null bodyOpenClassName
bodyOpenClassName={classNames({
'overflow-hidden': this.props.useStandardSizes
})}
className={{
base: classNames('modal-content', this.props.className, {
'modal-sizes': this.props.useStandardSizes