mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 22:39:34 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
26 lines
617 B
TypeScript
26 lines
617 B
TypeScript
import * as React from 'react';
|
|
|
|
import type { UploadProps } from './interface';
|
|
import type { UploadRef } from './Upload';
|
|
import Upload from './Upload';
|
|
|
|
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;
|