2020-04-01 02:00:29 +03:00
|
|
|
module Examples.Heading exposing (example, State, Msg)
|
2019-10-01 04:15:26 +03:00
|
|
|
|
|
|
|
{-|
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
@docs example, State, Msg
|
2019-10-01 04:15:26 +03:00
|
|
|
|
|
|
|
-}
|
|
|
|
|
2020-03-24 03:33:42 +03:00
|
|
|
import Category exposing (Category(..))
|
2019-10-01 04:15:26 +03:00
|
|
|
import Css
|
2020-03-31 23:33:05 +03:00
|
|
|
import Example exposing (Example)
|
2019-10-01 04:15:26 +03:00
|
|
|
import Html.Styled as Html
|
|
|
|
import Nri.Ui.Colors.V1 as Colors
|
|
|
|
import Nri.Ui.Heading.V2 as Heading
|
2022-01-29 00:12:17 +03:00
|
|
|
import ViewHelpers exposing (viewExamples)
|
2019-10-01 04:15:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
{-| -}
|
2020-04-01 02:00:29 +03:00
|
|
|
type alias State =
|
|
|
|
()
|
|
|
|
|
|
|
|
|
|
|
|
{-| -}
|
|
|
|
type alias Msg =
|
|
|
|
()
|
|
|
|
|
|
|
|
|
|
|
|
{-| -}
|
|
|
|
example : Example State Msg
|
2019-10-01 04:15:26 +03:00
|
|
|
example =
|
2020-09-09 21:43:10 +03:00
|
|
|
{ name = "Heading"
|
|
|
|
, version = 2
|
2020-06-19 23:41:28 +03:00
|
|
|
, categories = [ Text, Layout ]
|
2020-06-20 00:45:32 +03:00
|
|
|
, keyboardSupport = []
|
2020-03-31 23:33:05 +03:00
|
|
|
, state = ()
|
|
|
|
, update = \_ state -> ( state, Cmd.none )
|
|
|
|
, subscriptions = \_ -> Sub.none
|
2021-11-05 22:45:22 +03:00
|
|
|
, preview =
|
|
|
|
[ Heading.h1 [] [ Html.text "h1" ]
|
|
|
|
, Heading.h2 [] [ Html.text "h2" ]
|
|
|
|
, Heading.h3 [] [ Html.text "h3" ]
|
|
|
|
, Heading.h4 [] [ Html.text "h4" ]
|
|
|
|
]
|
2020-03-31 23:33:05 +03:00
|
|
|
, view =
|
2022-03-29 20:19:32 +03:00
|
|
|
\ellieLinkConfig _ ->
|
2022-01-29 00:12:17 +03:00
|
|
|
[ viewExamples
|
|
|
|
[ ( "h1", Heading.h1 [] [ Html.text "This is the main page heading." ] )
|
|
|
|
, ( "h2", Heading.h2 [] [ Html.text "This is a tagline" ] )
|
|
|
|
, ( "h3", Heading.h3 [] [ Html.text "This is a subHeading" ] )
|
|
|
|
, ( "h4", Heading.h4 [] [ Html.text "This is a smallHeading" ] )
|
|
|
|
]
|
2020-03-31 23:33:05 +03:00
|
|
|
, Heading.h2 [ Heading.style Heading.Top ]
|
|
|
|
[ Html.text "Heading.h2 [ Heading.style Heading.Top ]" ]
|
|
|
|
, Heading.h2 [ Heading.css [ Css.color Colors.highlightPurpleDark ] ]
|
|
|
|
[ Html.text "Heading.h2 [ Heading.css [ Css.color Colors.highlightPurpleDark ] ]" ]
|
|
|
|
]
|
2019-10-01 04:15:26 +03:00
|
|
|
}
|