import { Accept, FileRejection } from 'react-dropzone'; export interface UploadInputProps { /** * Input ID to link label and input programmatically together. */ inputId: string; /** * Callback for dropped/selected files, both for accepted and rejected files. */ onFilesAdded: (files: (File | FileRejection)[]) => Promise; /** * Additional aria-describedby ids, e.g. for field-level validation errors. */ 'aria-describedby'?: string; /** * The maximum size of an individual file, in bytes. */ maxSize?: number; /** * Valid mime type or file extension. * * @see {Link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#accept} * * @todo Facilitate our own mapping between mimetypes & extensions? */ accept?: Accept; /** * Maximum number of files accepted by the field. Set to `undefined` for no limit (the default). * * This is the upper limit for the `maxFilesToSelect` value - `maxFilesToSelect` is * equal to * `maxFiles - currentAmountOfUploads`. */ maxFiles?: number; /** * The maximum number of files that can still be selected at once. Equal to or less * than `maxFiles`, if set. * * @example If `maxFilesToSelect` is 5 and the user first selects 2 files, then * `maxFilesToSelect` will be set to `3`. */ maxFilesToSelect?: number; multiple?: boolean; onBlur?: React.FocusEventHandler; } /** * A file input to upload one or more files that also accepts drag and drop of files. */ declare const UploadInput: React.FC; export default UploadInput;