-
Notifications
You must be signed in to change notification settings - Fork 842
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 strings for EuiToolTip children #2292
Comments
I agree that |
I don't think we need to sacrifice the developer experience for accessibility; we can have both. I started to just open a PR to fix it but realized there were design considerations that were needed. Thanks for looking! |
@smith Do you still hav that PR handy, we can certainly help with the design considerations. |
@cchaos No I checked on the branch and there's nothing there, so I don't think I made any changes back then. Thanks for looking! |
Closing in favor of a Meta discussion around EuiTooltip flexibility which I've included a link to this discussion but needs to be a part of a greater effort. |
The type for the
children
prop ofEuiTooltip
isReact.ReactElement<any>
. It expects this because it does aReact.cloneElement
to create the anchor.Because it is of this type and not
React.ReactNode
, you cannot pass a string as children to a tooltip, so:has to become:
It would be nice if we were more flexible and allowed any
React.ReactNode
as children.The text was updated successfully, but these errors were encountered: