File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,13 +4,21 @@ This Image cropper is based on the gl-react-native [library](https://github.com/
44
55![ Cropping View] ( https://media.giphy.com/media/l46CDga4bxZccVxWU/giphy.gif )
66
7+ ## Installation
8+ ```
9+ npm i -S react-native-image-cropper
10+ ```
11+ or
12+ ```
13+ yarn add react-native-image-cropper
14+ ```
15+
716## Requirements
817- ` gl-react ` You need to install gl-react. ` npm i -S gl-react `
918- ` gl-react-native ` You need to install gl-react-native and link the repo in RN. ` npm i -S gl-react-native & rnpm link `
1019- ` react-native ` Android requires you to have RN 0.28 or higher!
1120
1221#### ` {ImageCrop} ` Props
13-
1422- ` image ` ** (required)** : link to image that should be cropped.
1523- ` cropHeight ` ** (required)** : height of the image in cropped size.
1624- ` cropWidth ` ** (required)** : width of the image in cropped size.
@@ -28,7 +36,11 @@ This Image cropper is based on the gl-react-native [library](https://github.com/
2836
2937## Example
3038``` js
39+ ...
40+ import {ImageCrop } from ' react-native-image-cropper'
41+
3142
43+ ...
3244render () {
3345 return (
3446 < View>
@@ -52,5 +64,6 @@ capture(){
5264 this .refs .cropper .crop ()
5365 .then (base64 => console .log (base64))
5466}
67+ ...
5568
5669```
You can’t perform that action at this time.
0 commit comments