export interface FileUpload { uploading?: boolean; progress?: number; error?: string; file: File; } export declare type DropzoneOptions = { /** * Set accepted file types. See https://github.com/okonet/attr-accept for more information. */ accept?: string | string[]; /** Enable/disable the dropzone */ disabled?: boolean; /** Maximum file size (in bytes) */ maxSize?: number; /** Minimum file size (in bytes) */ minSize?: number; /** Callback for when the drop event occurs */ onDrop?: (acceptedFiles: T[], fileRejections: FileRejection[], event: DropEvent) => void; /** Callback for when the drop event occurs */ onDropAccepted?: (files: T[], event: DropEvent) => void; /** Callback for when the drop event occurs */ onDropRejected?: (fileRejections: FileRejection[], event: DropEvent) => void; /** Custom validation function */ validator?: (file: T) => FileError | FileError[] | null; }; export declare type DropEvent = React.DragEvent | React.ChangeEvent | DragEvent | Event; export declare const ErrorCode: { readonly FileInvalidType: "file-invalid-type"; readonly FileTooLarge: "file-too-large"; readonly FileTooSmall: "file-too-small"; readonly TooManyFiles: "too-many-files"; }; declare type ErrorCodeType = typeof ErrorCode[keyof typeof ErrorCode]; export interface FileError { message: string; code: ErrorCodeType | string; } export interface FileRejection { file: File; errors: FileError[]; } export {};