@meta-1/design 0.0.164 → 0.0.165
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
|
@@ -6,7 +6,7 @@ import remove from "lodash/remove";
|
|
|
6
6
|
import { type DropzoneOptions, useDropzone } from "react-dropzone";
|
|
7
7
|
import { v4 as uuidv4 } from "uuid";
|
|
8
8
|
|
|
9
|
-
import { Button, Progress, useMessage } from "@meta-1/design";
|
|
9
|
+
import { Button, Progress, Tooltip, useMessage } from "@meta-1/design";
|
|
10
10
|
import { UIXContext } from "@meta-1/design/components/uix/config-provider";
|
|
11
11
|
import { cn } from "@meta-1/design/lib";
|
|
12
12
|
import type { HandleProps, UploadFile } from "./type";
|
|
@@ -166,13 +166,17 @@ export const Uploader = forwardRef<HTMLDivElement, UploaderProps>((props, forwar
|
|
|
166
166
|
<div className="flex h-8 w-8 items-center justify-center">
|
|
167
167
|
<FileIcon />
|
|
168
168
|
</div>
|
|
169
|
-
<div className="w-
|
|
170
|
-
<div className="mx-1 flex-1">
|
|
169
|
+
<div className="min-w-0 flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap text-sm">{file.name}</div>
|
|
170
|
+
<div className="mx-1 min-w-0 flex-1">
|
|
171
171
|
{file.status === "uploading" && <Progress className="w-full" value={file.progress} />}
|
|
172
172
|
{file.status === "error" && (
|
|
173
|
-
<div className="flex items-center justify-end
|
|
174
|
-
<
|
|
175
|
-
|
|
173
|
+
<div className="flex items-center justify-end">
|
|
174
|
+
<Tooltip content={file.error?.message}>
|
|
175
|
+
<CrossCircledIcon className="mr-1 flex-shrink-0 text-red-500" />
|
|
176
|
+
</Tooltip>
|
|
177
|
+
<span className="overflow-hidden text-ellipsis whitespace-nowrap text-red-500 text-sm">
|
|
178
|
+
{file.error?.message}
|
|
179
|
+
</span>
|
|
176
180
|
</div>
|
|
177
181
|
)}
|
|
178
182
|
{file.status === "done" && (
|