Selaa lähdekoodia

Update docs too

Artur Paikin 7 vuotta sitten
vanhempi
commit
803a88e7f2
3 muutettua tiedostoa jossa 23 lisäystä ja 6 poistoa
  1. 1 1
      src/plugins/DragDrop/index.js
  2. 18 1
      website/src/docs/dragdrop.md
  3. 4 4
      website/src/docs/fileinput.md

+ 1 - 1
src/plugins/DragDrop/index.js

@@ -29,7 +29,7 @@ module.exports = class DragDrop extends Plugin {
       allowMultipleFiles: true,
       width: '100%',
       height: '100%',
-      note: '',
+      note: null,
       locale: defaultLocale
     }
 

+ 18 - 1
website/src/docs/dragdrop.md

@@ -16,7 +16,8 @@ uppy.use(DragDrop, {
   target: null,
   width: '100%',
   height: '100%',
-  note: '',
+  allowMultipleFiles: true,
+  note: null,
   locale: {
     strings: {
       dropHereOr: 'Drop files here or',
@@ -26,6 +27,22 @@ uppy.use(DragDrop, {
 })
 ```
 
+### `target: null`
+
+DOM element, CSS selector, or plugin to place the drag and drop area into.
+
+### `width: '100%'`
+
+Drag and drop area width, set in inline CSS, so feel free to use percentage, pixels or other values that you like.
+
+### `height: '100%'`
+
+Drag and drop area height, set in inline CSS, so feel free to use percentage, pixels or other values that you like.
+
+### `allowMultipleFiles: true`
+
+Whether to allow user to select multiple files at once via the system file dialog.
+
 ### `note: null`
 
 Optionally specify a string of text that explains something about the upload for the user. This is a place to explain `restrictions` that are put in place. For example: `'Images and video only, 2–3 files, up to 1 MB'`.

+ 4 - 4
website/src/docs/fileinput.md

@@ -13,13 +13,13 @@ permalink: docs/fileinput/
 
 ```js
 uppy.use(FileInput, {
-  target: '.UppyForm',
+  target: null,
   allowMultipleFiles: true,
   pretty: true,
   inputName: 'files[]',
   locale: {
     strings: {
-      chooseFiles: 'Select to upload'
+      chooseFiles: 'Choose files'
     }
   }
 })
@@ -29,7 +29,7 @@ uppy.use(FileInput, {
 
 DOM element, CSS selector, or plugin to mount the file input into.
 
-### `multipleFiles: true`
+### `allowMultipleFiles: true`
 
 Whether to allow the user to select multiple files at once.
 
@@ -43,4 +43,4 @@ The `name` attribute for the `<input type="file">` element.
 
 ### `locale: {}`
 
-Custom text to show on the button when `pretty` is true. There is only one string that can be configured: `strings.chooseFiles`.
+Custom text to show on the button when `pretty` is true.