1.0.0 • Published 3 years ago
drag-tool-tmt v1.0.0
npm install --save crop-tools-tmt
import CropTool from 'crop-tools-tmt';
<CropTool
width={cropping.size}
aspectRatio={cropping.aspectRatio}
description={cropping.description}
onError={(e: Error) => handleError(e)}
onSave={(src: string) => {
return fetch(`some-image-save-url`)
}}
close={() => setCropping(null)}
src={data[cropping.index][0]}
uploadHandler={(blob: Blob) => {
handleUpload(blob)
}}
/>
1.0.0
3 years ago