mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
8705640a19
* fix: Upload tab experience * test: update snapshot * fix lint
25 lines
616 B
TypeScript
25 lines
616 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, hasControlInside = false, ...restProps }, ref) => (
|
|
<Upload
|
|
ref={ref}
|
|
hasControlInside={hasControlInside}
|
|
{...restProps}
|
|
type="drag"
|
|
style={{ ...style, height }}
|
|
/>
|
|
),
|
|
);
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
Dragger.displayName = 'Dragger';
|
|
}
|
|
|
|
export default Dragger;
|