-
Notifications
You must be signed in to change notification settings - Fork 38
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
Allow Tooltip to have string as child element #2724
Comments
We would need to add a wrapper element for our consumers in this case. <Tooltip>min streng</Tooltip> but in that case, we would need to wrap it in something like a This is somewhat related to #2451. I have started a PR for the issue above, and this can be lifted as a possible change there: #2777 |
Whats the use-case for having it support just string? Is the idea that they then attach the tooltip to an element using their own ref instead of us expecting children to be an element that supports ref? |
The
|
Wouldn't you want some styling to indicate there is a tooltip here? What if someone wants to use a Do you suggest we support string in addition to element as children, so check on the children type? |
This is exactly how it has been implemented in #2777. If you send a string, it is wrapped in a |
yes and yes 🙈 this is how @Barsnes has implemented, and we might want to add some default styling - good point. Dashed underline is a common convention, and design should probably have an opinion here, but bottom line is - I think it is very good if we support a default solution for Tooltip around text/string |
Yeah design can always come later, but it would also only be relevant if they don't send an element. I think guidelines is the way to go for styling |
Yeah, a dashed underline also came to mind 😄 As long as users stil have an option to also define the element and alternative styling it should be good 👍 |
Do we have an issue for this on design? |
Now we do :p #2781 |
I agree, no need to be blocked by something that is easy to implement later on |
No description provided.
The text was updated successfully, but these errors were encountered: