mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-29 16:44:41 +03:00
Add Nri.Ui.Page.V1 to styleguide
This commit is contained in:
parent
982fbc6f24
commit
f8bd18a8a0
54
styleguide-app/Examples/Page.elm
Normal file
54
styleguide-app/Examples/Page.elm
Normal 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
|
@ -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) ()
|
||||
|
Loading…
Reference in New Issue
Block a user