@stoker-platform/web-app 0.5.115 → 0.5.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.116
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: prevent file thumbnail layout shift
8
+
3
9
  ## 0.5.115
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.115",
3
+ "version": "0.5.116",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/src/Files.tsx CHANGED
@@ -138,14 +138,16 @@ const FileImageThumbnail = ({ storage, fullPath, fileName, pathPrefix }: FileIma
138
138
  return <File className="h-5 w-5 shrink-0 text-gray-500" aria-hidden />
139
139
  }
140
140
  return (
141
- <img
142
- src={url}
143
- alt={`Thumbnail for ${fileName}`}
144
- className="max-h-12 w-12 shrink-0 rounded-md object-contain"
145
- loading="lazy"
146
- decoding="async"
147
- onError={() => setPhase("fallback")}
148
- />
141
+ <div className="h-12 w-12 shrink-0 rounded-md flex items-center justify-center">
142
+ <img
143
+ src={url}
144
+ alt={`Thumbnail for ${fileName}`}
145
+ className="rounded-md max-h-12 max-w-12 object-contain"
146
+ loading="lazy"
147
+ decoding="async"
148
+ onError={() => setPhase("fallback")}
149
+ />
150
+ </div>
149
151
  )
150
152
  }
151
153