Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.
/ ReactMultiCrop Public archive

ReactMultiCrop Used Fabric.js and Integrated with react-admin

License

Notifications You must be signed in to change notification settings

bervProject/ReactMultiCrop

Repository files navigation

ReactMultiCrop

Deprecated

Move here

ReactMultiCrop Used Fabric.js and Integrated with react-admin. Designed for react-admin component.

code style: prettier

Build Status

Codacy Travis Github Action
Codacy Badge Build Status Node.js Package

Prerequisted and Dependecies

  • Please read how to install fabric.js:

https://www.npmjs.com/package/fabric

  • Dependencies:
    • Material UI
    • fabric.js

How to Install

    yarn add react-multi-crop

How to Use

You can use redux-form to embed this component for field input.

in react-admin

import ReactMultiCrop from 'react-multi-crop';
import { Field } from 'redux-form';

...
<Field name="my_field" component={ReactMultiCrop} />
...

in react-admin depend on another field for image showing

import ReactMultiCrop from 'react-multi-crop';
import { Field, formValues } from 'redux-form';

...
<Field name="image" component={ImageField} />
<Field name="my_field" component={formValues('image')(ReactMultiCrop)} />
...