Harry Hedger 9 лет назад
Родитель
Сommit
7611969a08

+ 8 - 0
website/src/examples/modal/partials/authorize.js

@@ -0,0 +1,8 @@
+export default (context) => {
+  return `
+    <section class='Modal-authorizeForm'>
+      <h1>Click here to authorize with ${context.provider}</h1>
+      <button class='Modal-authorizeBtn'>Authorize</button>
+    </section>
+  `
+}

+ 15 - 0
website/src/examples/modal/partials/browser.js

@@ -0,0 +1,15 @@
+export default (context) => {
+  const files = context.files.map(file => {
+    return `<li><span>${file.image}</span><span>${file.name}</span></li>`
+  }).join('')
+
+  return `
+    <section class='Modal-fileBrowser'>
+      <h1>${context.provider}</h1>
+      <h2>${context.currentDirectory}</h2>
+      <ul>
+        ${files}
+      </ul>
+    </section>
+  `
+}

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

@@ -0,0 +1 @@
+export default (partials) => partials.join('')

+ 13 - 0
website/src/examples/modal/partials/sidebar.js

@@ -0,0 +1,13 @@
+export default (context) => {
+  const providers = context.providers.map(provider => {
+    return `<li>${provider.name}</li>`
+  }).join('')
+
+  return `
+    <section class="ModalSidebar">
+      <ul>
+        ${providers}
+      </ul>
+    </section>
+  `
+}

+ 0 - 6
website/src/examples/modal/templates/authorize.js

@@ -1,6 +0,0 @@
-export default (context) => {
-  return `<section class='Modal-authorizeForm'>
-    <h1>Click here to authorize with ${context.provider}</h1>
-    <button class='Modal-authorizeBtn'>Authorize</button>
-  </section>`
-}