-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from vemarav/fix-android
Fix android
- Loading branch information
Showing
15 changed files
with
672 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
--- | ||
|
||
**Describe the bug** | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
|
||
Steps to reproduce the behavior: | ||
|
||
**Expected behavior** | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
|
||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Additional context** | ||
|
||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
|
||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
|
||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
|
||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
|
||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 - present Aravind Vemula | ||
|
||
All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,71 @@ | ||
# react-native-avatar-crop | ||
# react-native-avatar-crop | ||
|
||
## Demo | ||
|
||
<br> | ||
|
||
 | ||
|
||
## Usage | ||
|
||
check [dependencies](https://www.npmjs.com/package/react-native-avatar-crop?activeTab=dependencies) | ||
|
||
``` | ||
let crop; | ||
const {width: SCREEN_WIDTH} = Dimensions.get('window'); | ||
<Crop | ||
source={uri} | ||
cropShape={"circle"} // rect || circle | ||
width={SCREEN_WIDTH} | ||
height={SCREEN_WIDTH} | ||
cropArea={{ | ||
width: SCREEN_WIDTH / 1.3, | ||
height: SCREEN_WIDTH / 1.3, | ||
}} | ||
borderWidth={0} | ||
backgroundColor={'#FFFFFF'} | ||
opacity={0.7} // 0 till 1, default is 0.7 | ||
maxZoom= {3} // default 3 | ||
resizeMode={"contain"} // default "cover" | ||
onCrop={cropCallback => (crop = cropCallback)} // returns a function | ||
/> | ||
``` | ||
|
||
see full example [here](https://github.com/vemarav/react-native-avatar-crop/blob/main/example/CropImage.tsx) | ||
|
||
## CONTRIBUTING | ||
|
||
1. Whether you are a novice or experienced software developer, all contributions and suggestions are welcome! | ||
|
||
Clone repo | ||
|
||
git clone https://github.com/vemarav/react-native-avatar-crop.git | ||
2. Add features or bug fixes | ||
|
||
3. Make a Pull Request | ||
|
||
OR | ||
|
||
Report a bug [here](https://github.com/vemarav/react-native-avatar-crop/issues/new/choose) | ||
|
||
Feel free to contribute, hosted on ❤️ with Github. | ||
|
||
## LICENSE | ||
|
||
Package published under [MIT License](https://github.com/vemarav/subdomains/blob/master/LICENSE) | ||
|
||
## Author | ||
|
||
- [Aravind Vemula](https://github.com/vemarav) | ||
|
||
## LIKED IT | ||
|
||
Please use following button to star the, so it can reach others too | ||
|
||
[](https://github.com/vemarav/react-native-avatar-crop) | ||
|
||
|
||
## SOCIAL | ||
|
||
[](https://twitter.com/vemarav) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
module.exports = { | ||
printWidth: 120, | ||
bracketSpacing: false, | ||
jsxBracketSameLine: true, | ||
singleQuote: true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1173,12 +1173,12 @@ | |
resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.1.0.tgz#e42b1bef12d2415411519fd528e64b593b1363dc" | ||
integrity sha512-W/J0fNYVO01tioHjvYWQ9m6RgndVtbElzYozBq1ZPrHO/iCzlqoySHl4gO/fpCl9QEFjvJfjPgtPMTMlsoq5DQ== | ||
|
||
"@react-native-community/image-editor@^2.3.0": | ||
"@react-native-community/image-editor@*", "@react-native-community/image-editor@^2.3.0": | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/@react-native-community/image-editor/-/image-editor-2.3.0.tgz#8ac6c3691fd2c762d2abeb84c01a3b201bac3b1e" | ||
integrity sha512-+UJY8WkTkfSkjoU5blQnEI7tTg11jJLoM+YojjiQpEopUaRlYQU4SZ9Zd6F6wWfvc9bjvIeMY6FlKuESK/q4fQ== | ||
|
||
"@react-native-community/masked-view@^0.1.11": | ||
"@react-native-community/masked-view@*", "@react-native-community/masked-view@^0.1.11": | ||
version "0.1.11" | ||
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.11.tgz#2f4c6e10bee0786abff4604e39a37ded6f3980ce" | ||
integrity sha512-rQfMIGSR/1r/SyN87+VD8xHHzDYeHaJq6elOSCAD+0iLagXkSI2pfA0LmSXP21uw5i3em7GkkRjfJ8wpqWXZNw== | ||
|
@@ -5601,10 +5601,15 @@ react-is@^16.13.0, react-is@^16.7.0, react-is@^16.8.1: | |
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" | ||
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== | ||
|
||
react-native-avatar-crop@^0.0.6: | ||
version "0.0.6" | ||
resolved "https://registry.yarnpkg.com/react-native-avatar-crop/-/react-native-avatar-crop-0.0.6.tgz#d8ab66db5015af950a37c4e46f62756a3e5283b0" | ||
integrity sha512-ploV7UtMp0BfEs3meKloBeuGRd+VeX0PTOMtaH/s8TDIwhOeGD0zT/Go6VvkrIIUDKrwR8W26wbCk9/O5+rb3Q== | ||
[email protected]: | ||
version "0.0.7" | ||
resolved "https://registry.yarnpkg.com/react-native-avatar-crop/-/react-native-avatar-crop-0.0.7.tgz#58d7ba58755ca5a8715afeb3f97ced78c252753e" | ||
integrity sha512-nmssr8mOxJo7BDXD8E/8ZM0BTfsTmZ15mypHDiaeeAUtNUxpuWvmxYrbqU3fOtYwnf8Om6S5FbURRe5wlMHm6g== | ||
dependencies: | ||
"@react-native-community/image-editor" "*" | ||
"@react-native-community/masked-view" "*" | ||
react-native-gesture-handler "*" | ||
react-native-image-size "*" | ||
|
||
react-native-codegen@^0.0.6: | ||
version "0.0.6" | ||
|
@@ -5615,7 +5620,7 @@ react-native-codegen@^0.0.6: | |
jscodeshift "^0.11.0" | ||
nullthrows "^1.1.1" | ||
|
||
react-native-gesture-handler@^1.10.3: | ||
react-native-gesture-handler@*, react-native-gesture-handler@^1.10.3: | ||
version "1.10.3" | ||
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz#942bbf2963bbf49fa79593600ee9d7b5dab3cfc0" | ||
integrity sha512-cBGMi1IEsIVMgoox4RvMx7V2r6bNKw0uR1Mu1o7NbuHS6BRSVLq0dP34l2ecnPlC+jpWd3le6Yg1nrdCjby2Mw== | ||
|
@@ -5631,7 +5636,7 @@ react-native-image-picker@^4.0.6: | |
resolved "https://registry.yarnpkg.com/react-native-image-picker/-/react-native-image-picker-4.0.6.tgz#0dfa5bb83bcf6ff58635ebb9201a185c2271e8cc" | ||
integrity sha512-Pp3UWKUADuMG1mz12m6dSO/R2KnvXVEd77bldrfTMFpz4PFc4iVKo+bHeS79It0mUBezfzDMgfesg/OPLSugvQ== | ||
|
||
react-native-image-size@^1.1.3: | ||
react-native-image-size@*, react-native-image-size@^1.1.3: | ||
version "1.1.3" | ||
resolved "https://registry.yarnpkg.com/react-native-image-size/-/react-native-image-size-1.1.3.tgz#7d69c2cd4e1d1632947867e47643ed8cabb9de27" | ||
integrity sha512-jJvN6CjXVAm69LAVZNV7m7r50Qk9vuPZwLyrbs/k31/3Xs8bZyVCdvfP44FuBisITn/yFsiOo6i8NPrFBPH20w== | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,71 @@ | ||
# react-native-avatar-crop | ||
|
||
TODO: Add readme | ||
## Demo | ||
|
||
<br> | ||
|
||
 | ||
|
||
## Usage | ||
|
||
check [dependencies](https://www.npmjs.com/package/react-native-avatar-crop?activeTab=dependencies) | ||
|
||
``` | ||
let crop; | ||
const {width: SCREEN_WIDTH} = Dimensions.get('window'); | ||
<Crop | ||
source={uri} | ||
cropShape={"circle"} // rect || circle | ||
width={SCREEN_WIDTH} | ||
height={SCREEN_WIDTH} | ||
cropArea={{ | ||
width: SCREEN_WIDTH / 1.3, | ||
height: SCREEN_WIDTH / 1.3, | ||
}} | ||
borderWidth={0} | ||
backgroundColor={'#FFFFFF'} | ||
opacity={0.7} // 0 till 1, default is 0.7 | ||
maxZoom= {3} // default 3 | ||
resizeMode={"contain"} // default "cover" | ||
onCrop={cropCallback => (crop = cropCallback)} // returns a function | ||
/> | ||
``` | ||
|
||
see full example [here](https://github.com/vemarav/react-native-avatar-crop/blob/main/example/CropImage.tsx) | ||
|
||
## CONTRIBUTING | ||
|
||
1. Whether you are a novice or experienced software developer, all contributions and suggestions are welcome! | ||
|
||
Clone repo | ||
|
||
git clone https://github.com/vemarav/react-native-avatar-crop.git | ||
|
||
2. Add features or bug fixes | ||
|
||
3. Make a Pull Request | ||
|
||
OR | ||
|
||
Report a bug [here](https://github.com/vemarav/react-native-avatar-crop/issues/new/choose) | ||
|
||
Feel free to contribute, hosted on ❤️ with Github. | ||
|
||
## LICENSE | ||
|
||
Package published under [MIT License](https://github.com/vemarav/subdomains/blob/master/LICENSE) | ||
|
||
## Author | ||
|
||
- [Aravind Vemula](https://github.com/vemarav) | ||
|
||
## LIKED IT | ||
|
||
Please use following button to star the, so it can reach others too | ||
|
||
[](https://github.com/vemarav/react-native-avatar-crop) | ||
|
||
## SOCIAL | ||
|
||
[](https://twitter.com/vemarav) |
Oops, something went wrong.