Download src/components/features/files/file-list.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 574 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/files/file-list.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/files/file-list.tsx
-
curl -L -o file-list.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/files/file-list.tsx
574 Bytes
| import React from "react"; | |
| import { cn } from "#/utils/utils"; | |
| import { FileItem } from "./file-item"; | |
| interface FileListProps { | |
| files: string[]; | |
| onRemove?: (index: number) => void; | |
| } | |
| export function FileList({ files, onRemove }: FileListProps) { | |
| return ( | |
| <div | |
| data-testid="file-list" | |
| className={cn("flex flex-col gap-y-1.5 justify-start")} | |
| > | |
| {files.map((f, index) => ( | |
| <FileItem | |
| key={index} | |
| filename={f} | |
| onRemove={onRemove ? () => onRemove?.(index) : undefined} | |
| /> | |
| ))} | |
| </div> | |
| ); | |
| } | |