FileList

Given a typed manifest of already-resolved file URLs, renders an icon/label-by-content-type list with a real download link per file.

Usage

import { FileList } from "@/components/FileList";
import type { FileEntry } from "@/components/FileList";
import { withBasePath } from "@/lib/base-path";

// Resolve basePath at the call site — <FileList> takes already-resolved URLs.
const files: FileEntry[] = [
  { name: "Notes.txt", url: withBasePath("/file-list-samples/sample-notes.txt"), sizeBytes: 231, contentType: "text/plain" },
];

<FileList files={files} />