UNPKG

@spark-web/dropzone

Version:

--- title: Drop Zone isExperimentalPackage: true ---

29 lines (28 loc) 2.67 kB
import type { InputHTMLAttributes } from 'react'; import type { AcceptedType } from './mime-type-to-file-extension'; declare type InputProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange' | 'onBlur'>; export declare type DropzoneProps = InputProps & { /** File type(s) that the Dropzone should be allowed to accept. */ accept?: AcceptedType | AcceptedType[]; /** Maximum number of files that the Dropzone should be allowed to accept. */ maxFiles?: number; /** Maximum file size that the Dropzone should be allowed to accept. Value should be provided in kB */ maxFileSizeKb?: number; /** Minimum file size that the Dropzone should be allowed to accept. Value should be provided in kB */ minFileSizeKb?: number; /** When true, renders an image preview next to file previews. */ showImageThumbnails?: boolean; }; export declare const Dropzone: import("react").ForwardRefExoticComponent<InputProps & { /** File type(s) that the Dropzone should be allowed to accept. */ accept?: "audio/*" | "audio/mpeg" | "audio/wav" | "image/*" | "image/gif" | "image/heic" | "image/jpeg" | "image/png" | "image/svg+xml" | "image/tiff" | "image/webp" | "text/*" | "text/csv" | "text/plain" | "text/rtf" | "video/*" | "video/mp4" | "video/mpeg" | "application/msword" | "application/pdf" | "application/rtf" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/zip" | ("audio/*" | "audio/mpeg" | "audio/wav" | "image/*" | "image/gif" | "image/heic" | "image/jpeg" | "image/png" | "image/svg+xml" | "image/tiff" | "image/webp" | "text/*" | "text/csv" | "text/plain" | "text/rtf" | "video/*" | "video/mp4" | "video/mpeg" | "application/msword" | "application/pdf" | "application/rtf" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/zip")[] | undefined; /** Maximum number of files that the Dropzone should be allowed to accept. */ maxFiles?: number | undefined; /** Maximum file size that the Dropzone should be allowed to accept. Value should be provided in kB */ maxFileSizeKb?: number | undefined; /** Minimum file size that the Dropzone should be allowed to accept. Value should be provided in kB */ minFileSizeKb?: number | undefined; /** When true, renders an image preview next to file previews. */ showImageThumbnails?: boolean | undefined; } & import("react").RefAttributes<HTMLInputElement>>; export {};