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

fix: useMeasure type definitions for SVG #1745

Merged

Conversation

robinvw1
Copy link
Contributor

@robinvw1 robinvw1 commented Jan 12, 2021

Re-applied the changes of @thevtm from #479 to the useMeasure hook, because the Resize Observer API also works on SVG elements.

@streamich can you have a look?

@robinvw1
Copy link
Contributor Author

robinvw1 commented Jan 12, 2021

Here's a screenshot where I use useMeasure to get the width of the SVG <text> element and apply it (with padding) to the <rect> so the text has a background color.

image

@xobotyi
Copy link
Contributor

xobotyi commented Mar 10, 2021

@robinvw1 rebase it please

@robinvw1 robinvw1 force-pushed the pr/fix-usemeasure-typings-for-svg branch from b48b573 to e200f7f Compare March 11, 2021 09:18
@robinvw1
Copy link
Contributor Author

@xobotyi done

@xobotyi xobotyi merged commit 458895a into streamich:master Mar 11, 2021
@robinvw1 robinvw1 deleted the pr/fix-usemeasure-typings-for-svg branch March 11, 2021 09:23
@streamich
Copy link
Owner

🎉 This PR is included in version 17.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants