UNPKG

@imparth/react-file-viewer

Version:

Extendable file viewer for web that preview images, pdf and text files via file object or web url

19 lines (18 loc) 508 B
import React, { CSSProperties } from "react"; declare const defaultStyles: { container: CSSProperties; svg: CSSProperties; noPreviewText: CSSProperties; }; type FilePreviewProps = { type?: "url" | "file"; file?: File | null; url?: string; width?: string; height?: string; invalidExtensions?: string[]; styles?: typeof defaultStyles; onError?: (message: string | Error) => void; }; declare const FilePreview: React.FC<FilePreviewProps>; export default FilePreview;