react-multi-cropdeprecated

React Component for Field in react-admin using Fabric JS

Usage no npm install needed!

<script type="module">
  import reactMultiCrop from 'https://cdn.skypack.dev/react-multi-crop';
</script>

README

ReactMultiCrop

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

code style: prettier

Build Status

Codacy Travis
Codacy Badge Build Status

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