/* Copyright 2026 Marimo. All rights reserved. */ import { ArrowLeftIcon, DownloadIcon, RefreshCwIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Tooltip } from "@/components/ui/tooltip"; interface FilePreviewHeaderProps { filename?: string; filenameIcon?: React.ReactNode; onBack?: () => void; onRefresh?: () => void; onDownload?: () => void; /** Extra action buttons placed before the download button. */ actions?: React.ReactNode; } export const FilePreviewHeader: React.FC = ({ filename, filenameIcon, onBack, onRefresh, onDownload, actions, }) => { return (
{onBack && ( )} {filename ? ( {filenameIcon} {filename} ) : ( )}
{onRefresh && ( )} {actions} {onDownload && ( )}
); };