Browse Source

Add data attribute with source (so debugging is easier, or some customization), but hide the icon in css (#1809)

Artur Paikin 5 years ago
parent
commit
4acd8be938

+ 1 - 1
packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.js

@@ -49,7 +49,7 @@ const renderFileSize = (props) => (
 
 module.exports = function FileInfo (props) {
   return (
-    <div class="uppy-DashboardItem-fileInfo">
+    <div class="uppy-DashboardItem-fileInfo" data-uppy-file-source={props.file.source}>
       {renderFileName(props)}
       <div class="uppy-DashboardItem-status">
         {renderFileSize(props)}

+ 2 - 1
packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.scss

@@ -25,7 +25,8 @@
       text-transform: uppercase;
     }
     .uppy-DashboardItem-sourceIcon {
-      display: inline-block;
+      // display: inline-block;
+      display: none;
       vertical-align: bottom;
       color: $gray-400;
       &:not(:first-child) {