react-native-circular-action-menu
react-native-circular-action-menu copied to clipboard
Added tooltip prop to ActionButton.Item
This pull request adds tooltips to the ActionButtonItem component. It calculates the position of each action button and either places it to the left, right or on top of the action button item.
Here are pictures of what the tooltip looks like with an even and odd set of ActionButtonItems.
@geremih Would you be interested in adding this to your project?
Thanks @Ajackster! I have added some comments to be addressed before I can merge. Also, can you document your change in the Readme?
Hey @geremih I'm not sure what comments you are talking about. Happy to fix or improve anything though!
@geremih Hm I'm not too sure what the position prop actually does. I tried passing it down to the action button items and wasn't seeing the same result. I think the position prop is actually used for the placement of the actual ActionButton component, not necessarily the placement of the ActionButtonItems.
position="center"
position="left"
Would love to see this added. However, I think the tooltip text will also need a tooltipStyle prop to go with it to style the backdrop of the text and the text color. Or allow the user to supply a custom <Text /> component rather than limiting them to a string.
@AbhishekBiswal Haven't had the time to finish this yet, I've been very busy. I plan to finish this very soon.
@Ajackster any work-in-progress branch I can pull this from? I'm trying to implement this:

@Ajackster I tried this PR out and I have some feedback if you don't mind.
- For some weird reason, the tooltip doesn't show up on Android. Any idea why?
- The tooltips don't align properly when you right position the ActionButton. See attached screenshot.
I think the key might be to place it up slightly higher than the button rather than the middle. This is what the My fitness Pal app does:

@rknell do you know if my fitness pal is written in React Native?
No idea! it just looks suspiciously like this project hey
On 4 August 2017 at 07:48, Monte Thakkar [email protected] wrote:
@rknell https://github.com/rknell do you know if my fitness pal is written in React Native?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geremih/react-native-circular-action-menu/pull/3#issuecomment-320099441, or mute the thread https://github.com/notifications/unsubscribe-auth/AFmlbWrzoPFJhjLaHTGaj52f7Livi6Cgks5sUkA4gaJpZM4LxxtP .