Skip to content

Commit

Permalink
fix(ui:modal): use % instead of vh to avoid overview in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Jun 10, 2022
1 parent 46ff2fe commit 1cafbbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export function DModal(props: DModalProps): JSX.Element | null {
...transitionStyle,
width: dWidth,
top: dTop === 'center' ? undefined : dTop,
maxHeight: dTop === 'center' ? undefined : `calc(100vh - ${topStyle} - 20px)`,
maxHeight: dTop === 'center' ? undefined : `calc(100% - ${topStyle} - 20px)`,
}}
tabIndex={-1}
onKeyDown={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/styles/components/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
display: flex;

@include e(content) {
max-height: calc(100vh - 40px);
max-height: calc(100% - 40px);
margin: auto;
}
}
Expand Down

0 comments on commit 1cafbbc

Please sign in to comment.