mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2025-01-02 19:34:46 +03:00
Merge pull request #254 from NoRedInk/slide-modal-height-in-px
SlideModal expects the height to be specified in pixels instead of vh
This commit is contained in:
commit
6414f1e71e
@ -39,7 +39,7 @@ import Nri.Ui.Text.V2 as Text
|
||||
{-| -}
|
||||
type alias Config msg =
|
||||
{ panels : List Panel
|
||||
, height : Css.Vh
|
||||
, height : Css.Px
|
||||
, parentMsg : State -> msg
|
||||
}
|
||||
|
||||
@ -189,7 +189,10 @@ viewBackdrop modal =
|
||||
(Css.backgroundColor (Nri.Ui.Colors.Extra.withAlpha 0.9 Colors.navy)
|
||||
:: [ Css.height (Css.vh 100)
|
||||
, Css.left Css.zero
|
||||
, Css.overflow Css.hidden
|
||||
, Css.overflowX Css.hidden
|
||||
, -- allow the user to scroll when the content doesn't fit the
|
||||
-- viewport, but don't display a scrollbar if we don't need it
|
||||
Css.overflowY Css.visible
|
||||
, Css.position Css.fixed
|
||||
, Css.top Css.zero
|
||||
, Css.width (Css.pct 100)
|
||||
@ -218,7 +221,7 @@ type alias Panel =
|
||||
}
|
||||
|
||||
|
||||
panelContainer : Css.Vh -> List Css.Style -> List (Html msg) -> Html msg
|
||||
panelContainer : Css.Px -> List Css.Style -> List (Html msg) -> Html msg
|
||||
panelContainer height animationStyles panel =
|
||||
div
|
||||
[ css
|
||||
|
@ -98,7 +98,7 @@ viewModal state =
|
||||
, buttonLabel = "Let's get to it!"
|
||||
}
|
||||
]
|
||||
, height = Css.vh 60
|
||||
, height = Css.px 400
|
||||
, parentMsg = ModalMsg
|
||||
}
|
||||
state
|
||||
|
@ -19,7 +19,7 @@ all =
|
||||
SlideModal.open
|
||||
|> SlideModal.view
|
||||
{ panels = threePanels
|
||||
, height = Css.vh 60
|
||||
, height = Css.px 400
|
||||
, parentMsg = identity
|
||||
}
|
||||
|> Html.toUnstyled
|
||||
@ -34,7 +34,7 @@ all =
|
||||
SlideModal.closed
|
||||
|> SlideModal.view
|
||||
{ panels = threePanels
|
||||
, height = Css.vh 60
|
||||
, height = Css.px 400
|
||||
, parentMsg = identity
|
||||
}
|
||||
|> Html.toUnstyled
|
||||
@ -47,7 +47,7 @@ all =
|
||||
, test "can click through" <|
|
||||
\() ->
|
||||
{ panels = threePanels
|
||||
, height = Css.vh 60
|
||||
, height = Css.px 400
|
||||
, parentMsg = identity
|
||||
}
|
||||
|> initTest
|
||||
@ -62,7 +62,7 @@ all =
|
||||
, test "can navigate back using the dots" <|
|
||||
\() ->
|
||||
{ panels = threePanels
|
||||
, height = Css.vh 60
|
||||
, height = Css.px 400
|
||||
, parentMsg = identity
|
||||
}
|
||||
|> initTest
|
||||
@ -76,7 +76,7 @@ all =
|
||||
, test "cannot navigate forward using the dots" <|
|
||||
\() ->
|
||||
{ panels = threePanels
|
||||
, height = Css.vh 60
|
||||
, height = Css.px 400
|
||||
, parentMsg = identity
|
||||
}
|
||||
|> initTest
|
||||
|
Loading…
Reference in New Issue
Block a user