components.controls.FileUploader.FileUploader.jsx Maven / Gradle / Ivy
import React from 'react'
import Dropzone from 'react-dropzone'
import classNames from 'classnames'
import isEmpty from 'lodash/isEmpty'
import { Button } from 'reactstrap'
import FileUploaderList from './FileUploaderList'
function FileUploader({
accept,
uploading,
statusBarColor,
onRemove,
autoUpload,
showSize,
disabled,
children,
onDrop,
onDropRejected,
onDragEnter,
onDragLeave,
multiple,
visible,
className,
files,
componentClass,
onStartUpload,
uploaderClass,
saveBtnStyle,
deleteIcon,
t,
}) {
if (!visible) {
return null
}
const showControl = multiple || (!multiple && isEmpty(files))
return (
{children}
{!isEmpty(files) && (
)}
{!autoUpload && (
)}
)
}
FileUploader.defaultProps = {
t: () => {},
}
export default FileUploader
© 2015 - 2025 Weber Informatics LLC | Privacy Policy