Skip to content

Commit

Permalink
fix(project): fix vertical centering modal
Browse files Browse the repository at this point in the history
  • Loading branch information
royschut committed Aug 4, 2021
1 parent bcbc3ba commit ef4686e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Modal/Modal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
top: 0;
left: 0;
width: 100vw;
height: 100vh;
height: calc(100vh - calc(100vh - 100%));
}

.backdrop {
Expand Down
1 change: 0 additions & 1 deletion src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const Modal: React.FC<Props> = ({ open, onClose, children, AnimationComponent =
}

// prevent scrolling under the modal

document.body.style.marginRight = `${scrollbarSize()}px`;
document.body.style.overflowY = 'hidden';

Expand Down

0 comments on commit ef4686e

Please sign in to comment.