import React from 'react';
import { Upload as AntUpload, Button, Icon } from 'antd';

import Helper from './Helper';

class Upload extends React.Component<any, any> {
    public static Helper: typeof Helper;

    public render() {
        const props = {
            customRequest: Helper.customRequest(),
            onChange: (r: any) => {
                console.log(44, { ...r });
            },
        };
        return (
            <div>
                <AntUpload {...props}>
                    <Button>
                        <Icon type='upload' /> Click to Upload
                    </Button>
                </AntUpload>
            </div>
        );
    }
}

export default Upload;
