ant-design/components/upload/Dragger.tsx

16 lines
466 B
TypeScript
Raw Normal View History

import * as React from 'react';
import type { UploadProps } from './interface';
import Upload from './Upload';
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 }} />
));
if (process.env.NODE_ENV !== 'production') {
Dragger.displayName = 'Dragger';
}
export default Dragger;