eliminate prop type and validation console warnings

This commit is contained in:
Shawn Erquhart
2017-12-07 15:37:42 -05:00
parent 22017b4411
commit 051257aa12
11 changed files with 23 additions and 16 deletions

View File

@ -10,6 +10,10 @@ export class Modal extends React.Component {
onClose: PropTypes.func.isRequired,
}
componentDidMount() {
ReactModal.setAppElement('#nc-root');
}
render() {
const { isOpen, children, className, onClose } = this.props;
return (
@ -20,6 +24,7 @@ export class Modal extends React.Component {
className={{
base: `nc-modal-body ${className || ''}`,
afterOpen: 'nc-modal-body-opening',
beforeClose: '',
}}
overlayClassName={{
base: 'nc-modal-overlay',