1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
"use client";
import { FileText, MoreHorizontal, X } from "lucide-react";
import {
Attachment,
AttachmentAction,
AttachmentActions,
AttachmentContent,
AttachmentDescription,
AttachmentMedia,
AttachmentProgress,
AttachmentTitle,
} from "@/components/ui/attachment";
export default function AttachmentBasicPreview() {
return (
<div className="flex flex-col gap-3">
<Attachment>
<AttachmentMedia>
<FileText />
</AttachmentMedia>
<AttachmentContent>
<AttachmentTitle>project-brief.md</AttachmentTitle>
<AttachmentDescription>1.8 MB, uploaded</AttachmentDescription>
</AttachmentContent>
<AttachmentActions>
<AttachmentAction aria-label="More attachment actions">
<MoreHorizontal />
</AttachmentAction>
</AttachmentActions>
</Attachment>
<Attachment state="uploading">
<AttachmentMedia>
<FileText />
</AttachmentMedia>
<AttachmentContent>
<AttachmentTitle>design-review.pdf</AttachmentTitle>
<AttachmentDescription>2.4 MB, 64% uploaded</AttachmentDescription>
<AttachmentProgress
value={64}
aria-label="Uploading design-review.pdf"
className="mt-1.5"
/>
</AttachmentContent>
<AttachmentActions>
<AttachmentAction aria-label="Cancel upload">
<X />
</AttachmentAction>
</AttachmentActions>
</Attachment>
</div>
);
}