image-dropzone
v1.0.32
Published
[![NPM version][npm-image]][npm-url] [![Build][github-build]][github-build-url] ![npm-typescript] [![License][github-license]][github-license-url]
Downloads
10
Maintainers
Readme
image-dropzone-typescript-package
It is simple Image drag and drop.
Installation:
npm install image-dropzone --save-dev
or
yarn add -D image-dropzone
Usage :
Add ImageDropZone
to your component:
import React from 'react'
import ReactDOM from 'react-dom/client'
import { ImageDropZone } from 'image-dropzone'
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
<React.StrictMode>
<ImageDropZone
ref={yourDropzoneRef}
from={"businessLogo"}
sendUploadImage={handleUploadImage} // upload function
handleResetImage={handleResetImage} // reset image function
handleChangeImage={handleChangeImage} // change image function
/>
</React.StrictMode>,
)