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

feat(axis): Expose innerRef prop on the various Axis components #1749

Merged
merged 4 commits into from
Oct 10, 2023

Conversation

SheaJanke
Copy link
Contributor

🚀 Enhancements

  • Expose the innerRef prop on all the various the Axis components. This makes it possible to get the dimensions of the of the Axis without using getStringWidth on all the tick values.

closes: #1086

@SheaJanke SheaJanke changed the title Add axis refs feat(axis): Expose innerRef prop on the various Axis components Sep 20, 2023
@SheaJanke
Copy link
Contributor Author

@williaster if you have some time can you have a look at this please? It's a pretty simple change.

Copy link
Collaborator

@williaster williaster left a comment

Choose a reason for hiding this comment

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

Hey @SheaJanke sorry I was on vacation for a couple of weeks and am just catching up. This lgtm! As always, thank you for the contribution 🙌

@@ -215,4 +216,15 @@ describe('<Axis />', () => {
expect(points.at(2).prop('from')).toEqual({ x: 10.5, y: 0 });
expect(points.at(2).prop('to')).toEqual({ x: 0.5, y: 0 });
});

test('should expose its ref via an innerRef prop', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

thank you very much for adding tests 🙏 💯

@williaster williaster merged commit 56f4177 into airbnb:master Oct 10, 2023
2 checks passed
@github-actions
Copy link

🎉 This PR is included in version v3.4.0 of the packages modified 🎉

@SheaJanke SheaJanke deleted the add-axis-refs branch October 10, 2023 19:00
Onxi95 pushed a commit to Onxi95/visx that referenced this pull request Nov 21, 2023
…nb#1749)

* feat(axis): Expose innerRef prop on the Axis component

* feat(axis): Improve documentation for the innerRef prop

* feat(axis): Remove unnecessary import

* feat(axis): Retrigger build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants