halilb / react-native-textinput-effects

Text inputs with custom label and icon animations for iOS and android. Built with react native and inspired by Codrops.
MIT License
2.98k stars 291 forks source link

Icon appearing left in Kohana #51

Closed mbarbier003 closed 5 years ago

mbarbier003 commented 7 years ago

Hi, and thanks for the great component ! I noticed a display issue in the Kohana component with the 'envelope' icon from FontAwesomeIcon. I did not try more icons, the 'key' one works well. Here you can see the problem :

20542780_10211835568297357_1219304175_o

The icon still appears a little when the TouchableWithoutFeedback is not touched. I modified the transform: [ { translateX: focusedAnim.interpolate({ inputRange: [0, 1], outputRange: [-15 - iconSize, 0], }), }, ] from Kohana.js to : transform: [ { translateX: focusedAnim.interpolate({ inputRange: [0, 1], outputRange: [-20 - iconSize, 0], }), }, ] and it seems to work. But I don't want to have to modify the Kohana.js as I will likely export the project and my coworkers will npm install without this change made. I'm not sure my change works on all icons though. Thanks

halilb commented 7 years ago

Hi @mbarbier003, thanks for reporting!

You can always fork the repo and make your changes there, and you can point that repo in your package.json file.

Meanwhile, we can try finding an appropriate way to fix the issue for everyone.

mbarbier003 commented 7 years ago

Hi @halilb, I will fork and point to my repo until you find and release a suitable long-term solution :) Thanks

RiusmaX commented 7 years ago

+1 for the modification