aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/js/panel.jsx
blob: e1073c65b11570eab9933834fc2e7a9694eb7a31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from 'react';
import classnames from 'classnames';

class Panel extends React.Component {
  render = () => {
    if (this.props.component === null) {
      return <div></div>;
    }

    var className = classnames('row', this.props.topClassName);

    return (
      <div className={className}>
        <div className="box offset-1 col-10">
          <div className="row">
            <div className="col-12 panel-title">{this.props.title}</div>
          </div>
          <hr/>
          {this.props.component}
        </div>
      </div>);
    }
}

export default Panel;