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

Wrong type definition for Tooltip - content prop #511

Open
gguidotti opened this issue Mar 11, 2022 · 0 comments
Open

Wrong type definition for Tooltip - content prop #511

gguidotti opened this issue Mar 11, 2022 · 0 comments

Comments

@gguidotti
Copy link

Detailed description

Describe in detail the issue you're having.
When using the Tooltip component, if I use a function as the "content" prop (eg. <Tooltip content={() => renderSomething()} />) I get a warning about expecting a ReactNode type and getting a function instead. I believe this should be covered since even the Tooltip component itself contains a check about the type of "content" prop being a function or not (https://github.com/wfp/designsystem/blob/next/src/components/Tooltip/Tooltip.js#L109).

Is this issue related to a specific component?
Tooltip

What did you expect to happen? What happened instead? What would you like to see changed?
Enrich type definition by adding "function" type.
No warning shown.

What version of the WFP UI (Carbon Design System) are you using?
@wfp/[email protected]

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

No branches or pull requests

1 participant