From f5f3e6bfbd11d3881023e6104eb2d8d7f334ac16 Mon Sep 17 00:00:00 2001 From: Will McVay Date: Wed, 10 Apr 2024 14:45:06 +0100 Subject: [PATCH] fix: #29 #67 fix modal height issue (#95) --- src/components/modal/__styles__/index.ts | 4 +++- src/storybook/changelog.mdx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/modal/__styles__/index.ts b/src/components/modal/__styles__/index.ts index 0197eaaf..7616dc7f 100644 --- a/src/components/modal/__styles__/index.ts +++ b/src/components/modal/__styles__/index.ts @@ -20,7 +20,7 @@ export const ElModalBg = styled.div` export const ElModal = styled.div` display: none; - top: 40%; + top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: 0px 4px 16px 0px rgba(34, 43, 51, 0.16); @@ -30,6 +30,8 @@ export const ElModal = styled.div` width: 65%; min-width: 300px; max-width: 800px; + max-height: 80vh; + overflow: auto; padding: 1.25rem 1.5rem; &.${elIsActive} { diff --git a/src/storybook/changelog.mdx b/src/storybook/changelog.mdx index c6e03fc6..1ffb680a 100644 --- a/src/storybook/changelog.mdx +++ b/src/storybook/changelog.mdx @@ -19,6 +19,7 @@ Beta versions should be relatively stable but subject to occssional breaking cha ### **4.3.0 - 11/04/24** - Fixes issue where inline PersistentNotification z-index interfeares with Nav +- Fixes issue where Modal goes off the screen if too much content is included. Now scrolls and has a max height. ### **4.2.0 - 10/04/24**