Add Nri.Ui.Page.V1 to styleguide

This commit is contained in:
Jasper Woudenberg 2018-05-01 17:34:16 +02:00
parent 982fbc6f24
commit f8bd18a8a0
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,54 @@
module Examples.Page exposing (example, styles)
{-|
@docs example, styles
-}
import Css
import Css.Foreign exposing (Snippet, adjacentSiblings, children, class, descendants, each, everything, media, selector, withClass)
import Html exposing (Html)
import ModuleExample as ModuleExample exposing (Category(..), ModuleExample)
import Nri.Ui.Page.V1 as Page
import Nri.Ui.Styles.V1 as Styles
{-| -}
example : msg -> ModuleExample msg
example noOp =
{ filename = "Nri/Ui/Page/V1.elm"
, category = Pages
, content =
[ Html.h3 [] [ Html.text "Pages for problems" ]
, Html.h4 [] [ Html.text "Page: Not Found" ]
, Page.notFound
{ link = noOp
, name = "The Main Page"
}
, Html.h4 [] [ Html.text "Page: Broken" ]
, Page.broken
{ link = noOp
, name = "The Main Page"
}
]
}
{-| -}
styles : Styles.Styles id class msg
styles =
Styles.styles "Examples-Page-"
[ Css.Foreign.class Container
[ Css.displayFlex
, Css.flexWrap Css.wrap
]
]
-- INTERNAL
type CssClasses
= Container

View File

@ -7,6 +7,7 @@ import Examples.Colors
import Examples.Dropdown
import Examples.Fonts
import Examples.Icon
import Examples.Page
import Examples.SegmentedControl
import Examples.Select
import Examples.Table
@ -151,6 +152,7 @@ nriThemedModules model =
[ Examples.Button.example assets (exampleMessages ButtonExampleMsg) model.buttonExampleState
, Examples.Dropdown.example DropdownMsg model.dropdownState
, Examples.Icon.example
, Examples.Page.example NoOp
, Examples.SegmentedControl.example SegmentedControlMsg model.segmentedControlState
, Examples.Select.example SelectMsg model.selectState
, Examples.Text.example
@ -184,6 +186,7 @@ styles =
[ ModuleExample.styles
]
, (Examples.Icon.styles |> .css) ()
, (Examples.Page.styles |> .css) ()
, (Examples.SegmentedControl.styles |> .css) ()
, (Button.styles |> .css) assets
, (Nri.Ui.Dropdown.V1.styles |> .css) ()