Hi there! I've arrived here to report an issue with colors passed to the RNTooltips component.
Context
I've tried to apply a hex color to tintColor and textColor. It worked very well for regular 6 character hex color like: #000000 and #FFFFFF. But in my case, I wanted to pass it the colors generated from my theme and one of them (provided to tintColor) was a 3 character hex color: #fff which then threw an error saying Unknown color.
Process
- Do the setup described in docs.
- Pass
tintColor a 3 character hex string (eg. #fff).
- It should throw error on mount.
Expected result
It should parse the 3 character hex string same as the 6 character hex.
Current result
Not being able to pass a 3 character hex string.
Possible Fix
Maybe this article will be helpful.
I might not find time to make a pull request but I would be happy to help, if you need any.
PS. Since I'm already here, a feature request: Please make the package TypeScript compatible, it was a thing that annoyed me a little. 😃
Hi there! I've arrived here to report an issue with colors passed to the
RNTooltipscomponent.Context
I've tried to apply a hex color to
tintColorandtextColor. It worked very well for regular 6 character hex color like:#000000and#FFFFFF. But in my case, I wanted to pass it the colors generated from my theme and one of them (provided totintColor) was a 3 character hex color:#fffwhich then threw an error sayingUnknown color.Process
tintColora 3 character hex string (eg.#fff).Expected result
It should parse the 3 character hex string same as the 6 character hex.
Current result
Not being able to pass a 3 character hex string.
Possible Fix
Tooltips.Show. https://github.com/prscX/react-native-tooltips/blob/master/RNTooltips.js#L144Color.parseColor. https://github.com/prscX/react-native-tooltips/blob/master/android/src/main/java/px/tooltips/RNTooltipsModule.java#L102Maybe this article will be helpful.
I might not find time to make a pull request but I would be happy to help, if you need any.
PS. Since I'm already here, a feature request: Please make the package TypeScript compatible, it was a thing that annoyed me a little. 😃