react-image-uploader-fa
v1.1.0
Published
React library for the selection, edition and compression of images in png, jpeg and webp formats and has farsi language
Downloads
35
Maintainers
Readme
Installation
npm i react-image-uploader-fa --save
or yarn
yarn add react-image-uploader-fa
Usages
You must import the following where you will use it:
...
import ReactImagePickerEditor, { ImagePickerConf } from "react-image-uploader-fa";
import "react-image-uploader-fa/dist/index.css"
...
const config: ImagePickerConf = {
borderRadius: '8px',
language: 'fa',
width: '330px',
height: '250px',
objectFit: 'contain',
compressInitial: null,
};
// const initialImage: string = '/assets/images/8ptAya.webp';
const initialImage = '';
return <>
...
<ReactImagePickerEditor
config={config}
imageSrcProp={initialImage}
imageChanged={(newDataUri: any) => {
setImageSrc(newDataUri);
}}
imageDeleted={() => console.log("delete")}
imageUploaded={() => console.log("upload")}
imageDownloaded={() => console.log("download")}
imageEdited={() => console.log("edit")}
/>
</>
...
#######