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

58 lines
2.2 KiB
Elm
Raw Normal View History

2018-02-13 00:32:38 +03:00
module Examples.Text exposing (example)
{-|
@docs example
2018-02-13 00:32:38 +03:00
-}
import Html.Styled as Html
2018-02-13 00:32:38 +03:00
import ModuleExample as ModuleExample exposing (Category(..), ModuleExample)
2019-07-13 01:06:21 +03:00
import Nri.Ui.Heading.V1 as Heading exposing (DocumentLevel(..), VisualLevel(..), heading, withDocumentLevel, withVisualLevel)
2019-06-28 01:35:06 +03:00
import Nri.Ui.Text.V3 as Text
2018-02-13 00:32:38 +03:00
{-| -}
example : ModuleExample msg
example =
2019-06-28 01:35:06 +03:00
{ name = "Nri.Ui.Text.V3"
2018-02-13 00:32:38 +03:00
, category = Text
, content =
let
longerBody =
"""Be on the lookout for a new and improved assignment
creation form! Soon, you'll be able to easily see a summary
of the content you're assigning, as well as an estimate for
how long the assignment will take.
"""
in
2019-06-28 03:13:50 +03:00
[ Html.text "NOTE: When using these styles, please read the documentation in the Elm module about \"Understanding spacing\""
2019-07-13 01:06:21 +03:00
, 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 ]
, Text.smallBody [ Html.text <| "This is a smallBody. " ++ longerBody ]
, Text.smallBodyGray [ Html.text <| "This is a smallBodyGray. " ++ longerBody ]
, Text.caption [ Html.text <| "This is a caption. " ++ longerBody ]
, Html.hr [] []
, Text.heading [ Html.text "Paragraph styles for user-authored content" ]
, Text.ugMediumBody [ Html.text <| "This is an ugMediumBody. " ++ longerBody ]
, Text.ugSmallBody [ Html.text <| "This is an ugSmallBody. " ++ longerBody ]
2018-02-13 00:32:38 +03:00
]
}