/* Copyright 2026 Marimo. All rights reserved. */ import { DownloadIcon } from "lucide-react"; import { useLocale } from "react-aria"; import { Button } from "@/components/ui/button"; import type { FileInfo } from "@/core/network/types"; import { formatBytes } from "@/utils/formatting"; interface Props { file: FileInfo; mimeType: string; message: string; onDownload?: () => void; } export const FilePreviewMetadata = ({ file, mimeType, message, onDownload, }: Props) => { const { locale } = useLocale(); return (
Path {file.path} Type {mimeType} {file.size != null && ( <> Size {formatBytes(file.size, locale)} )}
{message}
{onDownload && ( )}
); };