Skip to content

Commit

Permalink
feat(calendar/dialog): increase width and margin
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaschiang committed Nov 2, 2021
1 parent c2e3152 commit 1fc9a0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions components/calendar/dialog/page.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
position: relative;
display: flex;
height: 100%;
max-height: calc(100vh - 12px);
max-height: calc(100vh - 48px);

.nav {
display: flex;
Expand Down Expand Up @@ -82,8 +82,7 @@
padding: 0 24px;
overflow: auto;
height: 100%;
width: 350px;
min-height: 350px;
width: 400px;
}

@mixin header() {
Expand Down
4 changes: 2 additions & 2 deletions components/calendar/dialog/surface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export default function DialogSurface({
document.documentElement.clientHeight || 0,
window.innerHeight || 0
);
if (alignedCenter < 0) return PREVIEW_MARGIN;
if (alignedCenter + bounds.height > vh) return vh - bounds.height - PREVIEW_MARGIN;
if (alignedCenter < 24) return 24;
if (alignedCenter + bounds.height + 24 > vh) return vh - bounds.height - 24;
return alignedCenter;
}, [alignedCenter, bounds.height]);

Expand Down

0 comments on commit 1fc9a0c

Please sign in to comment.