-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: useScrollbarWidth hook; #825
Conversation
@streamich the only thing im not sure in - should it be exported by default and be a default dependency or make it optional? |
@xobotyi As I understand it can return |
@streamich if developer added react bundle before the closing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think having it as default dependency is good.
package.json
Outdated
@@ -78,6 +79,7 @@ | |||
"@testing-library/react-hooks": "3.2.1", | |||
"@types/jest": "24.0.23", | |||
"@types/react": "16.9.11", | |||
"@xobotyi/scrollbar-width": "1.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have it in "dependencies"
, probably this line is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to remove from dev-deps.
# [13.12.0](v13.11.0...v13.12.0) (2019-12-09) ### Features * useScrollbarWidth hook; ([#825](#825)) ([125c7e9](125c7e9))
🎉 This PR is included in version 13.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This hook uses @xobotyi/scrollbar-width underneath, which is well tested and grown from my scrollbars component.
This PR absorbs #653
Type of change
Checklist
yarn test
)yarn lint
). Fix it withyarn lint:fix
in case of failure.yarn lint:types
).