ant-design/components/upload/Dragger.tsx
龙风 1cec18e8eb
fix: component.displayName To distinguish the environment (#36126)
Co-authored-by: afc163 <afc163@gmail.com>
2022-06-21 10:24:52 +08:00

19 lines
567 B
TypeScript

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