Skip to content

Commit

Permalink
fix(modal): lock scroll when active
Browse files Browse the repository at this point in the history
  • Loading branch information
abelflopes committed Nov 20, 2024
1 parent 853691b commit 1cf2c03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/modal/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Modal = ({
useEffect(() => {
openModals += 1;

if (openModals > 1) document.body.classList.add(`${styles.lock_scroll}`);
if (openModals >= 1) document.body.classList.add(`${styles.lock_scroll}`);

return () => {
openModals -= 1;
Expand Down

0 comments on commit 1cf2c03

Please sign in to comment.