From 2f2c1ef4029dee17be0d16acdd60b7d1718d519f Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Wed, 19 Jul 2017 02:06:56 +0200
Subject: refactor file browser stuff

---
 .../components/Browser/Folders/FolderListView.jsx  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 client/components/Browser/Folders/FolderListView.jsx

(limited to 'client/components/Browser/Folders/FolderListView.jsx')

diff --git a/client/components/Browser/Folders/FolderListView.jsx b/client/components/Browser/Folders/FolderListView.jsx
new file mode 100644
index 0000000..1ee76d8
--- /dev/null
+++ b/client/components/Browser/Folders/FolderListView.jsx
@@ -0,0 +1,24 @@
+import { h, Component } from 'preact'
+
+export default function FolderListView (props) {
+  console.log(props)
+  const folders = props.folders.map( (folder, i) => (
+    <div key={i} onClick={() => props.openFolder(folder)}>
+      <span class='name'>{folder.name}</span>
+    </div>
+  ))
+  
+  return (
+    <div class='window'>
+      <div class='heading'>
+        <b>browser</b>
+        <div class='buttons'>
+          <button onClick={props.initNewFolder}>+ folder</button>
+        </div>
+      </div>
+      <div class='list'>
+        {folders}
+      </div>
+    </div>
+  )
+}
-- 
cgit v1.2.3-70-g09d2

