From b1d95c2bd0f531124b2db592d92fd39c369699ae Mon Sep 17 00:00:00 2001 From: Ben Dansby Date: Fri, 14 Jan 2022 14:20:09 -0800 Subject: [PATCH] add mobile heights for title and footer, add mobile style --- src/Nri/Ui/Modal/V11.elm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Nri/Ui/Modal/V11.elm b/src/Nri/Ui/Modal/V11.elm index 0dc2c9bc..a821c772 100644 --- a/src/Nri/Ui/Modal/V11.elm +++ b/src/Nri/Ui/Modal/V11.elm @@ -610,19 +610,19 @@ viewInnerContent ({ visibleTitle } as config) = visibleFooter = not (List.isEmpty config.footer) - titleHeight = + ( titleDesktopHeight, titleMobileHeight ) = if visibleTitle then - 85 + ( 85, 45 ) else - 0 + ( 0, 0 ) - footerHeight = + ( footerDesktopHeight, footerMobileHeight ) = if visibleFooter then - 160 + ( 160, 137 ) else - 0 + ( 0, 0 ) modalTitleStyles = if visibleTitle then @@ -656,7 +656,7 @@ viewInnerContent ({ visibleTitle } as config) = , Css.maxHeight (Css.calc (Css.vh 100) Css.minus - (Css.px (footerHeight + titleHeight + 40)) + (Css.px (footerDesktopHeight + titleDesktopHeight + 40)) ) , Css.width (Css.pct 100) , Css.boxSizing Css.borderBox @@ -664,6 +664,11 @@ viewInnerContent ({ visibleTitle } as config) = , Css.paddingRight (Css.px 40) , Css.Media.withMedia [ mobile ] [ Css.padding (Css.px 20) + , Css.maxHeight + (Css.calc (Css.vh 100) + Css.minus + (Css.px (footerMobileHeight + titleMobileHeight)) + ) ] , if visibleTitle then Css.paddingTop Css.zero