ant-design/components/upload/Dragger.tsx
lijianan 1d1f4efcf4
type: update type unknown with UploadRef (#42985)
* type: update type unknown with UploadRef

* type: fix type
2023-06-13 11:48:01 +08:00

19 lines
520 B
TypeScript

import * as React from 'react';
import type { UploadRef } from './Upload';
import Upload from './Upload';
import type { UploadProps } from './interface';
export type DraggerProps = UploadProps & { height?: number };
const Dragger = React.forwardRef<UploadRef, DraggerProps>(
({ style, height, ...restProps }, ref) => (
<Upload ref={ref} {...restProps} type="drag" style={{ ...style, height }} />
),
);
if (process.env.NODE_ENV !== 'production') {
Dragger.displayName = 'Dragger';
}
export default Dragger;