noredink-ui/styleguide-app/Examples/Page.elm

46 lines
1.3 KiB
Elm
Raw Normal View History

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