Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Support image in tooltip #40

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

anupriy97
Copy link

@anupriy97 anupriy97 commented Jun 18, 2018

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

@mohebifar
Copy link
Owner

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.

@anupriy97
Copy link
Author

anupriy97 commented Jun 20, 2018

@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.

@RichardLitt
Copy link
Contributor

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

@anupriy97
Copy link
Author

@mohebifar @RichardLitt any comments on this PR ?

@mohebifar
Copy link
Owner

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.

@RichardLitt
Copy link
Contributor

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

@jakequade
Copy link
Contributor

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 :)

@Bayramito
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants