Browse Source

robodog: explain defaults and return value

Renée Kooi 6 years ago
parent
commit
105cdbc2d9
2 changed files with 16 additions and 1 deletions
  1. 1 1
      packages/@uppy/robodog/src/dashboard.js
  2. 15 0
      website/src/docs/robodog-dashboard.md

+ 1 - 1
packages/@uppy/robodog/src/dashboard.js

@@ -6,7 +6,7 @@ const addProviders = require('./addProviders')
 function dashboard (target, opts = {}) {
   const inline = opts.inline == null ? true : opts.inline
 
-  const pluginId = 'dashboard'
+  const pluginId = 'Dashboard'
   const uppy = createUppy(opts)
   addTransloaditPlugin(uppy, opts)
   uppy.use(Dashboard, {

+ 15 - 0
website/src/docs/robodog-dashboard.md

@@ -22,6 +22,21 @@ robodog.dashboard('#dashboard', {
 </script>
 ```
 
+This API can still be used as a modal, too, by specifying `inline: false`:
+
+```js
+robodog.dashboard(selector, { inline: false })
+```
+
+The `robodog.dashboard()` function returns an Uppy instance, which you can use to listen for any Uppy events.
+
+```js
+const uppy = robodog.dashboard(selector, { ...options })
+  .on('transloadit:result', (result) => {
+    console.log(result)
+  })
+```
+
 ## Transloadit
 
 All the options to the [Transloadit][transloadit] plugin are supported.