All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.controls.FileUploader.FileUploader.jsx Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
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