Open SrBrahma opened 3 years ago
If you wish, I can implement it.
@SrBrahma PR's are always welcome!
Hi, @swushi!
Now my todo-queue is quite long, so I can't make a proper PR for it now. I don't remember exactly all the changes I made in your lib for my personal uses and tastes back then, but here is my changed code, if you or someone else has interest:
(Note that as I was adapting it for my future personal components lib, there were some personal code styles changes)
It still has a bug on the first render with the placeholder animation, if I am not mistaken. I don't have experience with RN animation so I couldn't figure out on how to fix it.
And I have a wrapper component for it using react-hook-form:
The latter is quite messy and specific for portuguese language, but maybe you know how it's when developing an entire app alone hehe
My intention with both is to make a all-around text input component for not only this app but also my next ones. react-hook-form fits very nicely with your lib.
The TextInput is defined this way:
https://github.com/swushi/react-native-input-outline/blob/8bd774d8bb1bfc11d15b17fbf96135da91019bf4/src/components/InputOutline.tsx#L424-L436
The selectionColor from the props are replaced by the errorColor : activeColor.
In my case, where the app color is yellow/orange, the selectionColor is too strong, where the border color is ok
I have commented for now the lib selectionColor, so I can change it by myself. My ideia is to have
and the selectionColor would be just a string or (errorState: boolean) => string, a function where the dev can set the color of the selection if there is an error or not.
If you wish, I can implement it.