Skip to content

Commit

Permalink
pass classname to Modal component
Browse files Browse the repository at this point in the history
  • Loading branch information
John Benavides committed Mar 29, 2018
1 parent 38a7a7f commit 48f510a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ export default class Modal extends PureComponent {
showClose: PropTypes.bool,
children: PropTypes.element.isRequired,
document: PropTypes.object,
className: PropTypes.string,
}

static defaultProps = {
closeOnEsc: true,
showClose: true,
closeOnBlur: false,
className: '',
// Expose mount point for testing
document: null,
}
Expand Down Expand Up @@ -74,7 +76,7 @@ export default class Modal extends PureComponent {
if (!this.getDocument() || !this.portalElement) {
return null;
}
const { closeOnBlur, show } = this.props;
const { closeOnBlur, show, className } = this.props;
let { children } = this.props;
let isCard;
try {
Expand All @@ -92,7 +94,7 @@ export default class Modal extends PureComponent {
}

return ReactDOM.createPortal(
<div className={classnames('modal', {
<div className={classnames('modal', className, {
'is-active': show,
})}
>
Expand Down

0 comments on commit 48f510a

Please sign in to comment.