react-image-uploader-fa
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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")}
        />
        </>
      ...

#######

Package Sidebar

Install

npm i react-image-uploader-fa

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

509 kB

Total Files

23

Last publish

Collaborators

  • sepehrsharifzadeh