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

Text components' ref does not cast to correct element type when using as property #450

Open
bohdanbirdie opened this issue Oct 10, 2024 · 0 comments

Comments

@bohdanbirdie
Copy link

When using Text component with as property to change the element from <p/> to <span/> the ref types are not casted

const ref = useRef<HTMLSpanElement>(null)
.....
....
<Text
  as='span'
  ref={ref}
>
  {children}
</Text>

CleanShot 2024-10-10 at 12 50 07@2x

Issue seems to be propagated from the styled call with the cast to a specific element

CleanShot 2024-10-10 at 12 51 31@2x

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