mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-25 23:14:46 +08:00
feat: support basic file presenting
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { DownloadIcon } from "lucide-react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Card,
|
||||
CardAction,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { getFileExtension, getFileName } from "@/core/utils/files";
|
||||
|
||||
export function PresentFileList({ files }: { files: string[] }) {
|
||||
return (
|
||||
<ul className="w-full">
|
||||
{files.map((file) => (
|
||||
<Card key={file}>
|
||||
<CardHeader>
|
||||
<CardTitle>{getFileName(file)}</CardTitle>
|
||||
<CardDescription>{getFileExtension(file)} file</CardDescription>
|
||||
<CardAction>
|
||||
<Button variant="ghost">
|
||||
<DownloadIcon className="size-4" />
|
||||
Download
|
||||
</Button>
|
||||
</CardAction>
|
||||
</CardHeader>
|
||||
</Card>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user