2023-05-06 15:49:37 +08:00
|
|
|
import * as React from 'react';
|
2023-06-13 11:48:01 +08:00
|
|
|
import type { UploadRef } from './Upload';
|
2022-06-21 10:24:52 +08:00
|
|
|
import Upload from './Upload';
|
2023-06-13 11:48:01 +08:00
|
|
|
import type { UploadProps } from './interface';
|
2017-03-17 11:47:05 +08:00
|
|
|
|
|
|
|
export type DraggerProps = UploadProps & { height?: number };
|
|
|
|
|
2023-06-13 11:48:01 +08:00
|
|
|
const Dragger = React.forwardRef<UploadRef, 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;
|