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

Update types for Tooltip in main #3158

Closed
joshblack opened this issue Apr 12, 2023 · 0 comments · Fixed by #3159
Closed

Update types for Tooltip in main #3158

joshblack opened this issue Apr 12, 2023 · 0 comments · Fixed by #3159
Assignees
Labels
bug Something isn't working component: Tooltip Issues related to the Tooltip component react

Comments

@joshblack
Copy link
Member

We had a couple of type errors show up in dotcom after the tooltip updates were brought in:

  • Property 'className' does not exist on type 'ControlledTooltipProps'.
  • Property 'role' does not exist on type 'IntrinsicAttributes & { direction?: "s" | "w" | ...
  • Property 'className' does not exist on type 'IntrinsicAttributes & { direction?: "s" | "w" | ...
  • Property 'id' does not exist on type 'IntrinsicAttributes & Omit<TooltipProps, "children"> & { open?: boolean | undefined; ...
  • Object literal may only specify known properties, and 'className' does not exist in type 'PortalTooltipProps'.
  • Property 'className' does not exist on type 'IntrinsicAttributes & { direction?: "s" | "w" | ...
  • Property 'style' does not exist on type 'IntrinsicAttributes & Omit<TooltipProps, "children"> & { open?: boolean | undefined; ...
  • Property 'id' does not exist on type 'PortalTooltipProps'.

I believe this is due to TooltipProps no longer intersecting with the styled component (specifically & ComponentProps<typeof TooltipBase>)

@joshblack joshblack added bug Something isn't working react component: Tooltip Issues related to the Tooltip component labels Apr 12, 2023
@joshblack joshblack self-assigned this Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: Tooltip Issues related to the Tooltip component react
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant