Skip to content

Update types for Tooltip in main #3158

Description

@joshblack

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

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcomponent: TooltipIssues related to the Tooltip componentreact

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions