add mobile heights for title and footer, add mobile style

This commit is contained in:
Ben Dansby 2022-01-14 14:20:09 -08:00
parent 620bac6838
commit b1d95c2bd0

View File

@ -610,19 +610,19 @@ viewInnerContent ({ visibleTitle } as config) =
visibleFooter = visibleFooter =
not (List.isEmpty config.footer) not (List.isEmpty config.footer)
titleHeight = ( titleDesktopHeight, titleMobileHeight ) =
if visibleTitle then if visibleTitle then
85 ( 85, 45 )
else else
0 ( 0, 0 )
footerHeight = ( footerDesktopHeight, footerMobileHeight ) =
if visibleFooter then if visibleFooter then
160 ( 160, 137 )
else else
0 ( 0, 0 )
modalTitleStyles = modalTitleStyles =
if visibleTitle then if visibleTitle then
@ -656,7 +656,7 @@ viewInnerContent ({ visibleTitle } as config) =
, Css.maxHeight , Css.maxHeight
(Css.calc (Css.vh 100) (Css.calc (Css.vh 100)
Css.minus Css.minus
(Css.px (footerHeight + titleHeight + 40)) (Css.px (footerDesktopHeight + titleDesktopHeight + 40))
) )
, Css.width (Css.pct 100) , Css.width (Css.pct 100)
, Css.boxSizing Css.borderBox , Css.boxSizing Css.borderBox
@ -664,6 +664,11 @@ viewInnerContent ({ visibleTitle } as config) =
, Css.paddingRight (Css.px 40) , Css.paddingRight (Css.px 40)
, Css.Media.withMedia [ mobile ] , Css.Media.withMedia [ mobile ]
[ Css.padding (Css.px 20) [ Css.padding (Css.px 20)
, Css.maxHeight
(Css.calc (Css.vh 100)
Css.minus
(Css.px (footerMobileHeight + titleMobileHeight))
)
] ]
, if visibleTitle then , if visibleTitle then
Css.paddingTop Css.zero Css.paddingTop Css.zero