diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 22:19:14 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 22:19:14 +0200 |
| commit | f0983f54c7ea863855a0e035e784bf45f1e29c5b (patch) | |
| tree | 4857dda0dba9d945b4c1198fae4d054c681c2d98 /client/components/Modal.jsx | |
| parent | 32858022edf1142d2b05e98290d8cca9b6a8c87a (diff) | |
mobile css
Diffstat (limited to 'client/components/Modal.jsx')
| -rw-r--r-- | client/components/Modal.jsx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/client/components/Modal.jsx b/client/components/Modal.jsx index 6e7e574..9220e11 100644 --- a/client/components/Modal.jsx +++ b/client/components/Modal.jsx @@ -3,12 +3,23 @@ import { Link } from 'react-router-dom' export default class Modal extends Component { render() { - const className = this.props.visible ? 'modal visible' : 'modal' + if (this.props.visible) { + document.body.classList.add("inModal") + } + else { + document.body.classList.remove("inModal") + } + + const className = this.props.visible + ? 'modal visible' + : 'modal' + return ( <div class={className}> - {this.props.children} + <div class='inner'> + {this.props.children} + </div> </div> ) } } - |
