Closed Relax594 closed 4 years ago
@Relax594
Images are always a problem.. it was the reason why I created this tiny library.
Especially when we think in terms of wrapping <Rating />
inside <TocuhableOpacity />
, width/height scaling of image, background color leakage etc etc.
I faced similar issues on existing libraries like this
But let me think and analyse more over weekend..and see if this can be something which will add more value to library.
I modified the react-native-ratings repo (which is used in React-Native-Elements) to make it work like in my picture posted above. The way it works is the same as the way you do it in this repo. I just added a PNG which is transparent fill and has a border. A second layer with the fill-color is growing in height or width depending on rating.
Having this feature in this library would allow me to get rid of react-native-ratings, which is kinda abandoned.
@Relax594 ok! will check and revert.. should not be a big thing to implement.
@Relax594 Check v5.1.0
onStarTap
changed to onIconTap
@Relax594 I am closing this request as requested feature is added and released in v5.1.0. Feel free to reopen if request not fulfilled.
Looks really solid! Appreciate it!
Instead of defining just an icon, let us define a type with ["icon", "custom"] (defaults to icon) and if we set the type to custom, we can use an custom image (for example a .png file). This way we would be able to setup something like this:
Thanks a lot!