update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b third try
[osm/UI.git] / skyquake / plugins / admin / src / components / ColumnCard.jsx
diff --git a/skyquake/plugins/admin/src/components/ColumnCard.jsx b/skyquake/plugins/admin/src/components/ColumnCard.jsx
new file mode 100644 (file)
index 0000000..55fc9d2
--- /dev/null
@@ -0,0 +1,23 @@
+import React from 'react'
+
+export default class extends React.Component {
+    render() {
+        let { isSelected, path, children } = this.props;
+        const bgColor = ((isSelected && '#00acee !important') || 'inherit');
+        const className = ['card'];
+        isSelected && className.push('--selected');
+        const id = path.join('-') + className.join('-');
+        if (isSelected) {
+            children = (
+                <div style={{ backgroundColor: '#00acee !important', width: '100%' }} >
+                    {children}
+                </div>
+            )
+        }
+        return (
+            <div className={className.join(' ')} style={{ margin: '1px', padding: '3px' }} >
+                {children}
+            </div>
+        )
+    }
+}
\ No newline at end of file