react-material-file-upload
Version:
File upload compoennt for React with Material UI components
22 lines (21 loc) • 788 B
TypeScript
/// <reference types="react" />
import type { ButtonProps, TypographyProps } from '@mui/material';
import type { SxProps, Theme } from '@mui/system';
import { DropzoneOptions } from 'react-dropzone';
export interface FileUploadProps extends Omit<DropzoneOptions, 'onDrop' | 'onDropAccepted'> {
sx?: SxProps<Theme>;
typographyProps?: TypographyProps;
buttonProps?: Omit<ButtonProps, 'onClick'>;
title?: string;
buttonText?: string;
value: File[];
onChange: (files: File[]) => void;
}
declare const FileUpload: {
({ value, onChange, sx, title, buttonText, typographyProps, buttonProps, disabled, maxSize, ...options }: FileUploadProps): JSX.Element;
defaultProps: {
title: string;
buttonText: string;
};
};
export default FileUpload;