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

83 lines
2.5 KiB
Elm
Raw Normal View History

2021-10-13 20:44:03 +03:00
module Examples.Container exposing (Msg, State, example)
{-|
@docs Msg, State, example
-}
import Category exposing (Category(..))
import Css
import Example exposing (Example)
import Html.Styled as Html
import Html.Styled.Attributes exposing (css)
import Html.Styled.Events exposing (onClick)
import KeyboardSupport exposing (Direction(..), Key(..))
import Nri.Ui.Button.V10 as Button
import Nri.Ui.Colors.V1 as Colors
2021-10-21 22:17:48 +03:00
import Nri.Ui.Container.V2 as Container
2021-10-13 20:44:03 +03:00
import Nri.Ui.Heading.V2 as Heading
import Nri.Ui.Text.V5 as Text
{-| -}
example : Example State Msg
example =
{ name = "Container"
2021-10-22 00:47:50 +03:00
, version = 2
2021-10-13 20:44:03 +03:00
, categories = [ Layout ]
, keyboardSupport = []
, state = init
, update = update
, subscriptions = \_ -> Sub.none
, view =
\state ->
[ Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
2021-10-21 22:17:48 +03:00
[ Html.text "Default Container" ]
, Html.text "Your go-to container."
, Container.default [] (Html.text "Content, content...")
2021-10-13 20:44:03 +03:00
, Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
2021-10-21 22:17:48 +03:00
[ Html.text "Gray Container" ]
, Html.text "A container that doesn't draw too much attention to itself."
, Container.gray [] (Html.text "Content, content...")
2021-10-13 20:44:03 +03:00
, Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
2021-10-21 22:17:48 +03:00
[ Html.text "Pillow Container" ]
, Html.text "When you want something big and soft."
, Container.pillow [] (Html.text "Content, content...")
, Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
[ Html.text "Buttony Container" ]
, Html.text "Used for clickable button card things."
, Container.buttony [] (Html.text "Content, content...")
2021-10-13 20:44:03 +03:00
, Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
[ Html.text "Disabled Container" ]
, Html.text "Used to indicate content is locked/inaccessible"
, Container.disabled [] (Html.text "Content, content...")
, Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
[ Html.text "Invalid Container" ]
, Html.text "Used to indicate content is invalid"
, Container.invalid [] (Html.text "Content, content...")
]
}
{-| -}
init : State
init =
{}
{-| -}
type alias State =
{}
{-| -}
type alias Msg =
()
{-| -}
update : Msg -> State -> ( State, Cmd Msg )
update msg state =
( state, Cmd.none )