From d5b8f0ffbbde5fb8d41c3abb4b0969b962746b52 Mon Sep 17 00:00:00 2001
From: jloup <jloup@jloup.work>
Date: Sun, 13 May 2018 23:04:56 +0200
Subject: JS factorization + clean.

---
 cmd/web/js/panel.jsx | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 cmd/web/js/panel.jsx

(limited to 'cmd/web/js/panel.jsx')

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 @@
+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 col-12">
+          <div className="row">
+            <div className="col-4">{this.props.title}</div>
+          </div>
+          <hr/>
+          {this.props.component}
+        </div>
+      </div>);
+    }
+}
+
+export default Panel;
-- 
cgit v1.2.3

