2018-10-23 19:55:30 +03:00
|
|
|
module Examples.Page exposing (example)
|
2018-05-01 18:34:16 +03:00
|
|
|
|
|
|
|
{-|
|
|
|
|
|
|
|
|
@docs example, styles
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
import Css
|
2018-11-13 02:38:19 +03:00
|
|
|
import Css.Global exposing (Snippet, adjacentSiblings, children, class, descendants, each, everything, media, selector, withClass)
|
2018-10-23 19:55:30 +03:00
|
|
|
import Html.Styled as Html exposing (Html)
|
2018-05-01 18:34:16 +03:00
|
|
|
import ModuleExample as ModuleExample exposing (Category(..), ModuleExample)
|
2019-07-23 17:58:23 +03:00
|
|
|
import Nri.Ui.Heading.V2 as Heading
|
2019-05-14 02:04:10 +03:00
|
|
|
import Nri.Ui.Page.V3 as Page
|
2018-05-01 18:34:16 +03:00
|
|
|
|
|
|
|
|
|
|
|
{-| -}
|
|
|
|
example : msg -> ModuleExample msg
|
|
|
|
example noOp =
|
2019-05-14 02:04:10 +03:00
|
|
|
{ name = "Nri.Ui.Page.V3"
|
2018-05-01 18:34:16 +03:00
|
|
|
, category = Pages
|
|
|
|
, content =
|
2018-11-13 02:38:19 +03:00
|
|
|
[ Css.Global.global
|
|
|
|
[ Css.Global.selector "[data-page-container]"
|
2018-10-23 19:55:30 +03:00
|
|
|
[ Css.displayFlex
|
|
|
|
, Css.flexWrap Css.wrap
|
|
|
|
]
|
|
|
|
]
|
2019-07-23 17:58:23 +03:00
|
|
|
, Heading.h4 [] [ Html.text "Page: Not Found, recovery text: ReturnTo" ]
|
2018-05-01 18:34:16 +03:00
|
|
|
, Page.notFound
|
|
|
|
{ link = noOp
|
2019-05-14 02:04:10 +03:00
|
|
|
, recoveryText = Page.ReturnTo "the main page"
|
2018-05-01 18:34:16 +03:00
|
|
|
}
|
2019-07-23 17:58:23 +03:00
|
|
|
, Heading.h4 [] [ Html.text "Page: Broken, recovery text: Reload" ]
|
2018-05-01 18:34:16 +03:00
|
|
|
, Page.broken
|
|
|
|
{ link = noOp
|
2019-05-14 02:04:10 +03:00
|
|
|
, recoveryText = Page.Reload
|
2018-05-01 18:34:16 +03:00
|
|
|
}
|
2019-07-23 17:58:23 +03:00
|
|
|
, Heading.h4 [] [ Html.text "Page: No Permission, recovery text: Custom" ]
|
2018-05-03 15:32:26 +03:00
|
|
|
, Page.noPermission
|
|
|
|
{ link = noOp
|
2019-05-14 02:04:10 +03:00
|
|
|
, recoveryText = Page.Custom "Hit the road, Jack"
|
2018-05-03 15:32:26 +03:00
|
|
|
}
|
2018-05-01 18:34:16 +03:00
|
|
|
]
|
|
|
|
}
|