Fixed: Preserved state bug

This commit is contained in:
Tom Moor
2017-07-09 20:56:36 -07:00
parent a04af08064
commit 314ac75850
3 changed files with 33 additions and 20 deletions

View File

@ -11,15 +11,18 @@ class Modal extends Component {
render() {
const {
children,
isOpen,
title = 'Untitled Modal',
onRequestClose,
...rest
} = this.props;
if (!isOpen) return null;
return (
<StyledModal
contentLabel={title}
onRequestClose={onRequestClose}
isOpen={isOpen}
{...rest}
>
<Content column>