summaryrefslogtreecommitdiff
path: root/client/components/UI/Modal.jsx
blob: 2bd626377993302bbcac21f42c3d5808c59414fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { h, Component } from 'preact'

export default class Modal extends Component {
  constructor(props) {
    super()
  }
  render() {
    const className = this.props.visible ? 'modal visible' : 'modal'
    return (
      <div class={className}>
        <div class='inner'>
          {this.props.children}
        </div>
        <div class='close' onClick={this.props.onClose}>
          &times;
        </div>
      </div>
    )
  }
}