react-native-copilot icon indicating copy to clipboard operation
react-native-copilot copied to clipboard

Feat: Support image in tooltip

Open anupriy97 opened this issue 6 years ago • 8 comments

Currently the library doesn't support images in Tooltip. So this pull request allows the user to pass image as an attribute imageSource in CopilotStep

anupriy97 avatar Jun 18 '18 11:06 anupriy97

Thanks for the PR.

I think it'd be nice if we could pass in a custom React component/element instead of imageSource. That way we can have any type of element in the tooltip such as SVGs, and custom shapes made with View as well as Image.

mohebifar avatar Jun 18 '18 15:06 mohebifar

@mohebifar @RichardLitt Now we can pass a custom React component as well as an attribute extraComponent in CopilotStep. Take a look at the latest commit. Suggest (if any) more changes.

anupriy97 avatar Jun 20 '18 07:06 anupriy97

@mohebifar Can you take a look at this again? :)

RichardLitt avatar Jul 02 '18 16:07 RichardLitt

@mohebifar @RichardLitt any comments on this PR ?

anupriy97 avatar Jul 17 '18 09:07 anupriy97

I don't think the image thing is really needed anymore when we have extraComponent. Also, it can be confusing having both text and extraComponent. What would be the expected behavior when both are provided?

We'll need to think it through. I'll try to work on this as my first priority this Friday. Sorry to keep you waiting.

mohebifar avatar Jul 17 '18 19:07 mohebifar

@mohebifar Can you circle back to this, if possible?

RichardLitt avatar Nov 07 '18 17:11 RichardLitt

The simplest answer is just passing a tooltip in the copilot config that is your own custom tooltip, that then renders anything you want - including images. It honestly seems more trouble than it's worth to find a one-size-fits-all solution for an image prop. Just my 2c :)

jakequade avatar Mar 29 '23 01:03 jakequade

would be great if we could provide such extra component from step itself

Bayramito avatar Apr 12 '23 12:04 Bayramito