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 body scroll locking feature #4

Merged
merged 5 commits into from Aug 17, 2020

Conversation

PedroMiguelSS
Copy link
Contributor

This MR adds lockBodyScroll prop to Drawer component so that body scroll can be locked whenever the drawer is open.

⚠️ Note: it disables body scroll but it keeps drawer scroll if needed.

This prop is set to true by default. However, this behavior can be changed by setting it to false.

@codecov
Copy link

codecov bot commented Aug 15, 2020

Codecov Report

Merging #4 into master will increase coverage by 1.29%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #4      +/-   ##
==========================================
+ Coverage   97.67%   98.96%   +1.29%     
==========================================
  Files          11       11              
  Lines          86       97      +11     
  Branches       13       15       +2     
==========================================
+ Hits           84       96      +12     
+ Misses          2        1       -1     
Impacted Files Coverage Δ
src/components/drawer/Drawer.js 100.00% <100.00%> (ø)
src/providers/utils/use-drawer/useDrawer.js 88.88% <0.00%> (+11.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80b413c...19a4bd8. Read the comment docs.

README.md Outdated Show resolved Hide resolved
tests/components/Drawer.test.js Outdated Show resolved Hide resolved
tests/components/Drawer.test.js Outdated Show resolved Hide resolved
src/components/drawer/Drawer.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link

@acostalima acostalima left a comment

Choose a reason for hiding this comment

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

Good to go! 🚀

Pedro Santos and others added 3 commits August 17, 2020 16:23
Co-authored-by: André Costa Lima <andreclima.pt@gmail.com>
Co-authored-by: André Costa Lima <andreclima.pt@gmail.com>
Co-authored-by: André Costa Lima <andreclima.pt@gmail.com>
@PedroMiguelSS PedroMiguelSS merged commit 0e5acb0 into master Aug 17, 2020
@PedroMiguelSS PedroMiguelSS deleted the feat/lock-body-scroll-prop branch August 17, 2020 16:10
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.

None yet

2 participants