import type { Attachment } from "@/lib/types"; import { Spinner } from "../ui/spinner"; import { CrossSmallIcon } from "./icons"; export const PreviewAttachment = ({ attachment, isUploading = false, onRemove, }: { attachment: Attachment; isUploading?: boolean; onRemove?: () => void; }) => { const { name, url, contentType } = attachment; return (