Add possibility of closing popups

This commit is contained in:
André Wahlberg 2020-11-27 17:25:29 +01:00
parent 09b16e52a7
commit ca4a6bd011

View File

@ -22,9 +22,13 @@ class Popup extends Component {
render() { render() {
return ( return (
<div className={`${this.state.visible ? "visible" : ""}` + " popup"}> <>
<div className={`${this.state.visible ? "" : "hidden"}` + " popupClose"} onClick={this.hide} />
<div className={`${this.state.visible ? "visible" : ""}` + " popup " + this.props.className}>
{this.props.children} {this.props.children}
</div> </div>
</>
); );
} }
} }