2017-11-17 14:38:54 +08:00
|
|
|
import * as React from 'react';
|
2022-05-07 14:31:54 +08:00
|
|
|
import type { UploadProps } from './interface';
|
2022-06-21 10:24:52 +08:00
|
|
|
import Upload from './Upload';
|
2017-03-17 11:47:05 +08:00
|
|
|
|
|
|
|
export type DraggerProps = UploadProps & { height?: number };
|
|
|
|
|
2022-10-06 18:53:06 +08:00
|
|
|
const Dragger = React.forwardRef<unknown, DraggerProps>(({ style, height, ...restProps }, ref) => (
|
|
|
|
<Upload ref={ref} {...restProps} type="drag" style={{ ...style, height }} />
|
|
|
|
));
|
2020-08-18 15:44:31 +08:00
|
|
|
|
2022-06-21 10:24:52 +08:00
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
Dragger.displayName = 'Dragger';
|
|
|
|
}
|
2020-08-18 15:44:31 +08:00
|
|
|
|
|
|
|
export default Dragger;
|