소스 검색

Trying out modal partials. It works.

Harry Hedger 9 년 전
부모
커밋
a220f3f728

+ 0 - 26
src/plugins/Modal.js

@@ -1,26 +0,0 @@
-export default class Modal {
-  constructor (core, opts) {
-
-  }
-
-  connect (target) {
-  }
-
-  authenticate () {
-  }
-
-  addFile () {
-
-  }
-
-  getDirectory () {
-  }
-
-  run (results) {
-
-  }
-
-  render (files) {
-
-  }
-}

+ 3 - 0
website/src/examples/modal/app.es6

@@ -1,5 +1,8 @@
 // import Uppy from 'uppy/core'
 // import Uppy from 'uppy/core'
 // import { DragDrop, Tus10 } from 'uppy/plugins'
 // import { DragDrop, Tus10 } from 'uppy/plugins'
+import { Authorize, Browser, Modal, Sidebar } from './partials'
+console.log('here we go')
+console.log(Modal())
 
 
 const defaults = {
 const defaults = {
   width               : 380, // max = 640
   width               : 380, // max = 640

+ 11 - 0
website/src/examples/modal/partials/index.js

@@ -0,0 +1,11 @@
+import Authorize from './authorize'
+import Browser from './browser'
+import Modal from './modal'
+import Sidebar from './sidebar'
+
+export default {
+  Authorize,
+  Browser,
+  Modal,
+  Sidebar
+}

+ 15 - 1
website/src/examples/modal/partials/modal.js

@@ -1 +1,15 @@
-export default (partials) => partials.join('')
+import Sidebar from './sidebar'
+import Browser from './browser'
+
+export default () => {
+  return `
+    <section class='Modal'>
+      ${Sidebar({ providers: [{ name: 'Local' }, { name: 'Google Drive' }]})}
+      ${Browser({
+        files: [{ image: '123.png', name: '123.png' }],
+        provider: 'Dropbox',
+        currentDirectory: '/'
+      })}
+    </section>
+  `
+}

+ 1 - 1
website/src/examples/modal/partials/sidebar.js

@@ -4,7 +4,7 @@ export default (context) => {
   }).join('')
   }).join('')
 
 
   return `
   return `
-    <section class="ModalSidebar">
+    <section class='ModalSidebar'>
       <ul>
       <ul>
         ${providers}
         ${providers}
       </ul>
       </ul>