Files
wehub-resource-sync 221778fa98
rowboat / apps/x Vitest suites (push) Has been cancelled
rowboat / apps/x Electron package smoke test (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:33:34 +08:00

19 lines
658 B
TypeScript

import { FileIcon, FilesIcon, FileTextIcon, GlobeIcon } from "lucide-react";
export function DataSourceIcon({
type = undefined,
size = "sm",
}: {
type?: "crawl" | "urls" | "files" | "text" | undefined;
size?: "sm" | "md";
}) {
const sizeClass = size === "sm" ? "w-4 h-4" : "w-6 h-6";
return <>
{type === undefined && <FileIcon className={sizeClass} />}
{type == "crawl" && <GlobeIcon className={sizeClass} />}
{type == "urls" && <GlobeIcon className={sizeClass} />}
{type == "files" && <FilesIcon className={sizeClass} />}
{type == "text" && <FileTextIcon className={sizeClass} />}
</>;
}