mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-25 06:33:09 +03:00
Launch full-screen examples
This commit is contained in:
parent
01fa2d4e0a
commit
a595dac7a1
@ -130,12 +130,36 @@ preview_ navigate example =
|
|||||||
|
|
||||||
|
|
||||||
view : Maybe Route -> Example state msg -> Html msg
|
view : Maybe Route -> Example state msg -> Html msg
|
||||||
view =
|
view previousRoute example =
|
||||||
Lazy.lazy2 view_
|
Container.view
|
||||||
|
[ Container.pillow
|
||||||
|
, Container.css
|
||||||
|
[ Css.position Css.relative
|
||||||
|
, Css.margin (Css.px 10)
|
||||||
|
, Css.minHeight (Css.calc (Css.vh 100) Css.minus (Css.px 20))
|
||||||
|
, Css.boxSizing Css.borderBox
|
||||||
|
]
|
||||||
|
, Container.html
|
||||||
|
[ Lazy.lazy view_ example
|
||||||
|
, ClickableSvg.link ("Close " ++ example.name ++ " example")
|
||||||
|
UiIcon.x
|
||||||
|
[ ClickableSvg.href
|
||||||
|
(Maybe.withDefault Routes.All previousRoute
|
||||||
|
|> Routes.toString
|
||||||
|
)
|
||||||
|
, ClickableSvg.small
|
||||||
|
, ClickableSvg.css
|
||||||
|
[ Css.position Css.absolute
|
||||||
|
, Css.top (Css.px 15)
|
||||||
|
, Css.right (Css.px 15)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
view_ : Maybe Route -> Example state msg -> Html msg
|
view_ : Example state msg -> Html msg
|
||||||
view_ previousRoute example =
|
view_ example =
|
||||||
Html.div
|
Html.div
|
||||||
[ -- this class makes the axe accessibility checking output easier to parse
|
[ -- this class makes the axe accessibility checking output easier to parse
|
||||||
String.replace "." "-" example.name
|
String.replace "." "-" example.name
|
||||||
@ -159,13 +183,6 @@ view_ previousRoute example =
|
|||||||
]
|
]
|
||||||
, KeyboardSupport.view example.keyboardSupport
|
, KeyboardSupport.view example.keyboardSupport
|
||||||
, Html.div [] (example.view example.state)
|
, Html.div [] (example.view example.state)
|
||||||
, ClickableSvg.link ("Close " ++ example.name ++ " example")
|
|
||||||
UiIcon.x
|
|
||||||
[ ClickableSvg.href
|
|
||||||
(Maybe.withDefault Routes.All previousRoute
|
|
||||||
|> Routes.toString
|
|
||||||
)
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user