2017-11-17 14:38:54 +08:00
|
|
|
import * as React from 'react';
|
2017-03-17 11:47:05 +08:00
|
|
|
import Upload from './Upload';
|
|
|
|
import { UploadProps } from './interface';
|
|
|
|
|
|
|
|
export type DraggerProps = UploadProps & { height?: number };
|
|
|
|
|
2020-08-18 15:44:31 +08:00
|
|
|
const InternalDragger: React.ForwardRefRenderFunction<unknown, DraggerProps> = (
|
|
|
|
{ style, height, ...restProps },
|
|
|
|
ref,
|
2020-12-09 17:12:32 +08:00
|
|
|
) => <Upload ref={ref} {...restProps} type="drag" style={{ ...style, height }} />;
|
2020-08-18 15:44:31 +08:00
|
|
|
|
|
|
|
const Dragger = React.forwardRef(InternalDragger) as React.FC<DraggerProps>;
|
|
|
|
|
|
|
|
Dragger.displayName = 'Dragger';
|
|
|
|
|
|
|
|
export default Dragger;
|