🐛 fixes the broken see-only-this-link and the view docs link

This commit is contained in:
Tessa Kelly 2019-09-30 18:15:26 -07:00
parent 8a482a9720
commit 9cba1a22d0
3 changed files with 37 additions and 22 deletions

View File

@ -0,0 +1,31 @@
module Examples.Heading exposing (example)
{-|
@docs example
-}
import Css
import Html.Styled as Html
import ModuleExample as ModuleExample exposing (Category(..), ModuleExample)
import Nri.Ui.Colors.V1 as Colors
import Nri.Ui.Heading.V2 as Heading
{-| -}
example : ModuleExample msg
example =
{ name = "Nri.Ui.Heading.V2"
, category = Text
, content =
[ Heading.h1 [] [ Html.text "This is the main page heading." ]
, Heading.h2 [] [ Html.text "This is a tagline" ]
, Heading.h3 [] [ Html.text "This is a subHeading" ]
, Heading.h4 [] [ Html.text "This is a smallHeading" ]
, 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 ] ]" ]
]
}

View File

@ -6,10 +6,8 @@ module Examples.Text exposing (example)
-} -}
import Css
import Html.Styled as Html import Html.Styled as Html
import ModuleExample as ModuleExample exposing (Category(..), ModuleExample) import ModuleExample as ModuleExample exposing (Category(..), ModuleExample)
import Nri.Ui.Colors.V1 as Colors
import Nri.Ui.Heading.V2 as Heading import Nri.Ui.Heading.V2 as Heading
import Nri.Ui.Text.V4 as Text import Nri.Ui.Text.V4 as Text
@ -17,7 +15,7 @@ import Nri.Ui.Text.V4 as Text
{-| -} {-| -}
example : ModuleExample msg example : ModuleExample msg
example = example =
{ name = "Nri.Ui.Text.V4 (with headers from Nri.Ui.Heading.V2)" { name = "Nri.Ui.Text.V4"
, category = Text , category = Text
, content = , content =
let let
@ -28,30 +26,14 @@ example =
how long the assignment will take. how long the assignment will take.
""" """
in in
[ Html.text "NOTE: When using these styles, please read the documentation in the Elm module about \"Understanding spacing\"" [ Text.caption [ Html.text "NOTE: When using these styles, please read the documentation in the Elm module about \"Understanding spacing\"" ]
, Heading.h1 [] [ Html.text "This is the main page heading." ] , Heading.h2 [ Heading.style Heading.Top ] [ Html.text "Paragraph styles" ]
, Heading.h2 [] [ Html.text "This is a tagline" ]
, Heading.h3 [] [ Html.text "This is a subHeading" ]
, Heading.h4 [] [ Html.text "This is a smallHeading" ]
, Html.hr [] []
, Heading.h2 [] [ Html.text "Paragraph styles" ]
, Text.mediumBody [ Html.text <| "This is a mediumBody. " ++ longerBody ] , Text.mediumBody [ Html.text <| "This is a mediumBody. " ++ longerBody ]
, Text.smallBody [ Html.text <| "This is a smallBody. " ++ longerBody ] , Text.smallBody [ Html.text <| "This is a smallBody. " ++ longerBody ]
, Text.smallBodyGray [ Html.text <| "This is a smallBodyGray. " ++ longerBody ] , Text.smallBodyGray [ Html.text <| "This is a smallBodyGray. " ++ longerBody ]
, Text.caption [ Html.text <| "This is a caption. " ++ longerBody ] , Text.caption [ Html.text <| "This is a caption. " ++ longerBody ]
, Html.hr [] [] , Heading.h2 [ Heading.style Heading.Top ] [ Html.text "Paragraph styles for user-authored content" ]
, Heading.h2 [] [ Html.text "Paragraph styles for user-authored content" ]
, Text.ugMediumBody [ Html.text <| "This is an ugMediumBody. " ++ longerBody ] , Text.ugMediumBody [ Html.text <| "This is an ugMediumBody. " ++ longerBody ]
, Text.ugSmallBody [ Html.text <| "This is an ugSmallBody. " ++ longerBody ] , Text.ugSmallBody [ Html.text <| "This is an ugSmallBody. " ++ longerBody ]
---------------
, Html.hr [] []
, Heading.h2 [] [ Html.text "Headings with overrides" ]
, Heading.h2
[ Heading.style Heading.Top ]
[ Html.text "I'm an H2 with the top style!" ]
, Heading.h2
[ Heading.css [ Css.color Colors.highlightPurpleDark ] ]
[ Html.text "I have a custom color!" ]
] ]
} }

View File

@ -11,6 +11,7 @@ import Examples.Colors
import Examples.DisclosureIndicator import Examples.DisclosureIndicator
import Examples.Dropdown import Examples.Dropdown
import Examples.Fonts import Examples.Fonts
import Examples.Heading
import Examples.Icon import Examples.Icon
import Examples.Modal import Examples.Modal
import Examples.Page import Examples.Page
@ -276,6 +277,7 @@ nriThemedModules model =
, Examples.Page.example NoOp , Examples.Page.example NoOp
, Examples.SegmentedControl.example SegmentedControlMsg model.segmentedControlState , Examples.SegmentedControl.example SegmentedControlMsg model.segmentedControlState
, Examples.Select.example SelectMsg model.selectState , Examples.Select.example SelectMsg model.selectState
, Examples.Heading.example
, Examples.Text.example , Examples.Text.example
, Examples.Text.Writing.example , Examples.Text.Writing.example
, Examples.Fonts.example , Examples.Fonts.example