next-helios-fe 1.8.90 → 1.8.92

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.8.90",
3
+ "version": "1.8.92",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -211,9 +211,11 @@ export const File: React.FC<FileProps> = ({
211
211
  }`}
212
212
  />
213
213
  </div>
214
- <div className="flex flex-col gap-2 items-center">
214
+ <div className="flex flex-col gap-2 items-center w-full">
215
215
  {tempFile.length !== 0 ? (
216
- <span>{tempFile[0]?.name}</span>
216
+ <span className="w-full text-center truncate whitespace-nowrap">
217
+ {tempFile[0]?.name}
218
+ </span>
217
219
  ) : (
218
220
  <div className="flex gap-2 text-disabled">
219
221
  <span className="underline underline-offset-2">
@@ -222,19 +224,21 @@ export const File: React.FC<FileProps> = ({
222
224
  <span>or drag and drop</span>
223
225
  </div>
224
226
  )}
225
- <span
226
- className={`text-sm font-light ${
227
- tempFile.length !== 0 ? "" : "text-disabled"
228
- }`}
229
- >
230
- {tempFile.length !== 0
231
- ? `${
232
- tempFile[0]?.size < 1000000
233
- ? `${tempFile[0]?.size / 1000} KB`
234
- : `${tempFile[0]?.size / 1000000} MB`
235
- }`
236
- : `Maximum file size ${options?.maxSizeInMb} MB`}
237
- </span>
227
+ {options?.maxSizeInMb && (
228
+ <span
229
+ className={`text-sm font-light ${
230
+ tempFile.length !== 0 ? "" : "text-disabled"
231
+ }`}
232
+ >
233
+ {tempFile.length !== 0
234
+ ? `${
235
+ tempFile[0]?.size < 1000000
236
+ ? `${(tempFile[0]?.size / 1000).toFixed(2)} KB`
237
+ : `${(tempFile[0]?.size / 1000000).toFixed(2)} MB`
238
+ }`
239
+ : `Maximum file size ${options?.maxSizeInMb} MB`}
240
+ </span>
241
+ )}
238
242
  </div>
239
243
  </div>
240
244
  </div>