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: Add useSize hook to @w3ux/hooks #134

Merged
merged 2 commits into from
Nov 2, 2024
Merged

feat: Add useSize hook to @w3ux/hooks #134

merged 2 commits into from
Nov 2, 2024

Conversation

rossbulat
Copy link
Contributor

@rossbulat rossbulat commented Nov 2, 2024

Adds a custom useSize hook to get the width and height of a specified element. Updates the size state when the specified "outer element" (or the window by default) resizes.

Allows custom throttle in milliseconds.

@rossbulat rossbulat marked this pull request as ready for review November 2, 2024 03:35
@rossbulat rossbulat merged commit f8ef1ef into main Nov 2, 2024
@rossbulat rossbulat deleted the rb-add-use-size branch November 2, 2024 03:36
This was referenced Nov 2, 2024
@rossbulat rossbulat self-assigned this Nov 2, 2024
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.

1 participant