UNPKG

react-material-file-upload

Version:

File upload component for React with Material UI components

18 lines (15 loc) 748 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { TypographyProps, ButtonProps } from '@mui/material'; import { SxProps, Theme } from '@mui/system'; import { DropzoneOptions } from 'react-dropzone'; 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) => react_jsx_runtime.JSX.Element; export { FileUpload, type FileUploadProps };