@amsterdam/bmi-component-library
Version:
A React component library based on ASC and Material-UI aimed at repurposing and sharing components across BMI projects
27 lines • 1 kB
TypeScript
import type { FC, HTMLAttributes } from 'react';
import { DropzoneOptions } from 'react-dropzone';
import { CustomFile, CustomFileOrRejection } from './hooks';
export type FileUploadProps = {
getPostUrl: (file: CustomFile) => Promise<string>;
getHeaders: () => Promise<{
[key: string]: string;
}>;
placeholder: string;
droppingLabel: string;
removeLabel: string;
cancelLabel: string;
selectFilesLabel: string;
fileUploadErrorLabel: string;
fileUploadInProgressLabel: string;
fileListTitle?: string;
removeCompletedFromList?: boolean;
onFileNameClick?: (file: CustomFile) => void;
onFileRemove?: (file: CustomFileOrRejection) => void;
onFileSuccess?: (file: CustomFile) => void;
options?: DropzoneOptions;
storedFiles?: CustomFileOrRejection[];
httpMethod?: 'POST' | 'PUT';
} & HTMLAttributes<HTMLDivElement>;
declare const FileUpload: FC<FileUploadProps>;
export default FileUpload;
//# sourceMappingURL=FileUpload.d.ts.map