mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-28 10:17:49 +03:00
use new heading API in styleguide
This commit is contained in:
parent
dd902d6e5f
commit
4a99f65a4b
@ -8,6 +8,7 @@ module Examples.Text exposing (example)
|
||||
|
||||
import Html.Styled as Html
|
||||
import ModuleExample as ModuleExample exposing (Category(..), ModuleExample)
|
||||
import Nri.Ui.Heading.V1 as Heading exposing (DocumentLevel(..), VisualLevel(..), heading, withDocumentLevel, withVisualLevel)
|
||||
import Nri.Ui.Text.V3 as Text
|
||||
|
||||
|
||||
@ -26,10 +27,22 @@ example =
|
||||
"""
|
||||
in
|
||||
[ Html.text "NOTE: When using these styles, please read the documentation in the Elm module about \"Understanding spacing\""
|
||||
, Text.heading [ Html.text "This is the main page heading." ]
|
||||
, Text.tagline [ Html.text "This is a tagline" ]
|
||||
, Text.subHeading [ Html.text "This is a subHeading" ]
|
||||
, Text.smallHeading [ Html.text "This is a smallHeading" ]
|
||||
, heading [ Html.text "This is the main page heading." ]
|
||||
|> withVisualLevel Top
|
||||
|> withDocumentLevel H1
|
||||
|> Heading.view
|
||||
, heading [ Html.text "This is a tagline" ]
|
||||
|> withVisualLevel Tagline
|
||||
|> withDocumentLevel H2
|
||||
|> Heading.view
|
||||
, heading [ Html.text "This is a subHeading" ]
|
||||
|> withVisualLevel Subhead
|
||||
|> withDocumentLevel H3
|
||||
|> Heading.view
|
||||
, heading [ Html.text "This is a smallHeading" ]
|
||||
|> withVisualLevel Small
|
||||
|> withDocumentLevel H4
|
||||
|> Heading.view
|
||||
, Html.hr [] []
|
||||
, Text.heading [ Html.text "Paragraph styles" ]
|
||||
, Text.mediumBody [ Html.text <| "This is a mediumBody. " ++ longerBody ]
|
||||
|
Loading…
Reference in New Issue
Block a user