diff options
Diffstat (limited to 'cmd/web/js/panel.jsx')
-rw-r--r-- | cmd/web/js/panel.jsx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmd/web/js/panel.jsx b/cmd/web/js/panel.jsx new file mode 100644 index 0000000..c293e9a --- /dev/null +++ b/cmd/web/js/panel.jsx | |||
@@ -0,0 +1,25 @@ | |||
1 | import React from 'react'; | ||
2 | import classnames from 'classnames'; | ||
3 | |||
4 | class Panel extends React.Component { | ||
5 | render = () => { | ||
6 | if (this.props.component === null) { | ||
7 | return <div></div>; | ||
8 | } | ||
9 | |||
10 | var className = classnames('row', this.props.topClassName); | ||
11 | |||
12 | return ( | ||
13 | <div className={className}> | ||
14 | <div className="box col-12"> | ||
15 | <div className="row"> | ||
16 | <div className="col-4">{this.props.title}</div> | ||
17 | </div> | ||
18 | <hr/> | ||
19 | {this.props.component} | ||
20 | </div> | ||
21 | </div>); | ||
22 | } | ||
23 | } | ||
24 | |||
25 | export default Panel; | ||