mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
parent
7404a7ea32
commit
d72f825f43
@ -4,8 +4,11 @@ import { UploadProps } from './interface';
|
||||
|
||||
export type DraggerProps = UploadProps & { height?: number };
|
||||
|
||||
const Dragger: React.FC<DraggerProps> = props => (
|
||||
<Upload {...props} type="drag" style={{ ...props.style, height: props.height }} />
|
||||
);
|
||||
|
||||
export default Dragger;
|
||||
// stick class comoponent to avoid React ref warning inside Form
|
||||
// https://github.com/ant-design/ant-design/issues/18707
|
||||
export default class Dragger extends React.Component<DraggerProps, any> {
|
||||
render() {
|
||||
const { props } = this;
|
||||
return <Upload {...props} type="drag" style={{ ...props.style, height: props.height }} />;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user