Browse Source

maxWidth, maxHeight --> width and height

regardless of what we call it inside this makes more sense, I think
Artur Paikin 7 years ago
parent
commit
7cbcdeb0b3
2 changed files with 6 additions and 5 deletions
  1. 2 2
      src/plugins/Dashboard/Dashboard.js
  2. 4 3
      src/plugins/Dashboard/index.js

+ 2 - 2
src/plugins/Dashboard/Dashboard.js

@@ -49,8 +49,8 @@ module.exports = function Dashboard (props) {
         aria-modal={!props.inline && 'true'}
         role={!props.inline && 'dialog'}
         style={{
-          maxWidth: props.inline && props.maxWidth ? props.maxWidth : '',
-          maxHeight: props.inline && props.maxHeight ? props.maxHeight : ''
+          width: props.inline && props.width ? props.width : '',
+          height: props.inline && props.height ? props.height : ''
         }}>
         <button class="uppy-Dashboard-close"
           type="button"

+ 4 - 3
src/plugins/Dashboard/index.js

@@ -44,7 +44,7 @@ module.exports = class Dashboard extends Plugin {
         importFrom: 'Import from',
         dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',
         dashboardTitle: 'Uppy Dashboard',
-        copyLinkToClipboardSuccess: 'Link copied to clipboard.',
+        copyLinkToClipboardSuccess: 'Link copied to clipboard',
         copyLinkToClipboardFallback: 'Copy the URL below',
         copyLink: 'Copy link',
         fileSource: 'File source',
@@ -362,6 +362,7 @@ module.exports = class Dashboard extends Plugin {
 
   handleDrop (files) {
     this.uppy.log('[Dashboard] Files were dropped')
+    console.log(files)
 
     files.forEach((file) => {
       this.uppy.addFile({
@@ -479,8 +480,8 @@ module.exports = class Dashboard extends Plugin {
       toggleFileCard: this.toggleFileCard,
       saveFileCard: saveFileCard,
       updateDashboardElWidth: this.updateDashboardElWidth,
-      maxWidth: this.opts.maxWidth,
-      maxHeight: this.opts.maxHeight,
+      width: this.opts.width,
+      height: this.opts.height,
       showLinkToFileUploadResult: this.opts.showLinkToFileUploadResult,
       proudlyDisplayPoweredByUppy: this.opts.proudlyDisplayPoweredByUppy,
       currentWidth: pluginState.containerWidth,