import React from 'react';
import { Button } from '../style';
type IProps = {
    fileInput: any;
    disabled?: boolean;
    state: any;
    maxUpload: number;
    label?: string;
};
const Component = function({ fileInput, disabled, state, maxUpload, label }: IProps) {
    return (
        <Button
            icon="Upload"
            onClick={() => (fileInput.current as HTMLInputElement).click()}
            disabled={disabled || state.files.length >= maxUpload}
        >
            {label}
        </Button>
    );
};
export default Component;
