From 1fc9a0cfaf5aefaf18c16ca3d6743d1f719ff7b5 Mon Sep 17 00:00:00 2001 From: Nicholas Chiang Date: Mon, 1 Nov 2021 15:00:10 -0700 Subject: [PATCH] feat(calendar/dialog): increase width and margin --- components/calendar/dialog/page.module.scss | 5 ++--- components/calendar/dialog/surface.tsx | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/calendar/dialog/page.module.scss b/components/calendar/dialog/page.module.scss index 89ae1f8f..1c9fc94c 100644 --- a/components/calendar/dialog/page.module.scss +++ b/components/calendar/dialog/page.module.scss @@ -6,7 +6,7 @@ position: relative; display: flex; height: 100%; - max-height: calc(100vh - 12px); + max-height: calc(100vh - 48px); .nav { display: flex; @@ -82,8 +82,7 @@ padding: 0 24px; overflow: auto; height: 100%; - width: 350px; - min-height: 350px; + width: 400px; } @mixin header() { diff --git a/components/calendar/dialog/surface.tsx b/components/calendar/dialog/surface.tsx index d9e80c53..37472132 100644 --- a/components/calendar/dialog/surface.tsx +++ b/components/calendar/dialog/surface.tsx @@ -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]);