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

[core] feat(Text): forward ref to DOM element #6331

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

maclockard
Copy link
Contributor

Fixes #6320

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Makes it so that the Text component forwards a ref to the underlying HTML element.

Reviewers should focus on:

Correctly following patterns of the rest of the code base

Comment on lines +23 to +26
export interface TextProps
extends Props,
React.RefAttributes<HTMLElement>,
Omit<React.HTMLAttributes<HTMLElement>, "title"> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to better match other Prop interfaces elsewhere in the code base.

@adidahiya adidahiya changed the title Forward text ref [core] feat(Text): forward ref to DOM element Aug 25, 2023
Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs preview

LGTM, thanks @maclockard!

@adidahiya adidahiya merged commit fd43667 into palantir:develop Aug 25, 2023
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

Successfully merging this pull request may close these issues.

Text component doesn't correctly attach ref passed via props
2 participants