From 50904f4b010c417d558174005a7b4c5868e7d8d9 Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Thu, 29 Jun 2017 01:18:06 +0200
Subject: sketch folder stuff

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

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

diff --git a/client/components/Folders/Folders.jsx b/client/components/Folders/Folders.jsx
new file mode 100644
index 0000000..7c27311
--- /dev/null
+++ b/client/components/Folders/Folders.jsx
@@ -0,0 +1,30 @@
+import { h, Component } from 'preact'
+import { Link } from 'react-router-dom'
+
+import Modal from '../Modal.jsx'
+import FolderForm from './FolderForm.jsx'
+
+export default class Folders extends Component {
+  constructor(props) {
+    super()
+    this.state = {
+      adding: false,
+    }
+  }
+  openModal() {
+    this.setState({ adding: true })
+  }
+  closeModal() {
+    this.setState({ adding: false })
+  }
+  render() {
+    return (
+      <div class='folders'>
+        <button onClick={() => this.openModal()}>+</button>
+        <Modal visible={this.state.adding} onClose={() => this.closeModal()}>
+          <FolderForm />
+        </Modal>
+      </div>
+    )
+  }
+}
-- 
cgit v1.2.3-70-g09d2

