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

Tooltip type definition doesn't accept a ref prop #1430

Open
1 of 2 tasks
greg-nulogy opened this issue Aug 28, 2024 · 0 comments
Open
1 of 2 tasks

Tooltip type definition doesn't accept a ref prop #1430

greg-nulogy opened this issue Aug 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working legacy Affects components in the legacy design system TypeScript

Comments

@greg-nulogy
Copy link
Contributor

Describe the bug

Currently we can't pass a ref prop to the Tooltip component. The Tooltip component uses the forwardRef helper so should accept a ref prop.

Steps to reproduce

within PM, client_react:

import React from "react";
import { Tooltip } from "@nulogy/components";

export default function Component() {
  const someRef = React.useRef(null);

  return (
    <Tooltip ref={someRef}>
      <span>Children</span>
    </Tooltip>
  );
}

Expected behaviour

No Typescript errors.

Actual behaviour:

Property ref does not exist on type
IntrinsicAttributes & TooltipProps & { children?: ReactNode; }

Is your team blocked from moving forward by the bug?

No, we've cast the Tooltip component to allow for a ref prop

Who would you like to fix the bug?

  • Myself
  • DesignOps

When do you need this by?

Unknown, doesn't block current work.

Helpful resources

No response

Additional context

No response

@greg-nulogy greg-nulogy added the bug Something isn't working label Aug 28, 2024
@haideralsh haideralsh added legacy Affects components in the legacy design system TypeScript labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working legacy Affects components in the legacy design system TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants