3.14.4 • Published 4 years ago
antd-img-crop-adv v3.14.4
antd-img-crop-advanced
An image cropper for Ant Design Upload.
Install
yarn add antd-img-crop-advancedUsage
import ImgCrop from 'antd-img-crop-advanced';
import { Upload } from 'antd';
const Demo = () => (
<ImgCrop>
<Upload>+ Add image</Upload>
</ImgCrop>
);Props
Same as antd-img-crop
| Prop | Type | Default | Description |
|---|---|---|---|
| modalBody | string/func | 'null' | Add-on for the content part |
Styles
To prevent overwriting the custom styles to antd, antd-img-crop does not import the style files of components.
Therefore, if your project configured babel-plugin-import, and not use Modal or Slider, you need to import the styles yourself:
import 'antd/es/modal/style';
import 'antd/es/slider/style';