Merge pull request #1 from NoRedInk/add-small-header-to-text

Add small header to text
This commit is contained in:
Brooke 2018-02-12 12:29:49 -08:00 committed by GitHub
commit fdbdb45fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 37 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "1.0.0", "version": "1.1.0",
"summary": "UI Widgets we use at NRI", "summary": "UI Widgets we use at NRI",
"repository": "https://github.com/NoRedInk/noredink-ui.git", "repository": "https://github.com/NoRedInk/noredink-ui.git",
"license": "BSD3", "license": "BSD3",

View File

@ -9,6 +9,7 @@ module Nri.Ui.Text.V1
, smallBody , smallBody
, smallBodyClassString , smallBodyClassString
, smallBodyGray , smallBodyGray
, smallHeading
, styles , styles
, subHeading , subHeading
, tagline , tagline
@ -22,6 +23,7 @@ module Nri.Ui.Text.V1
@docs smallBody @docs smallBody
@docs smallBodyGray @docs smallBodyGray
@docs subHeading @docs subHeading
@docs smallHeading
@docs tagline @docs tagline
Text class strings: Text class strings:
@ -67,6 +69,13 @@ subHeading content =
h3 [ class [ SubHeading, Text ] ] content h3 [ class [ SubHeading, Text ] ] content
{-| This is a small Page Heading.
-}
smallHeading : List (Html msg) -> Html msg
smallHeading content =
h4 [ class [ SmallHeading, Text ] ] content
{-| This is some medium body copy. {-| This is some medium body copy.
-} -}
mediumBody : List (Html msg) -> Html msg mediumBody : List (Html msg) -> Html msg
@ -149,6 +158,7 @@ type CssClasses
| Heading | Heading
| Tagline | Tagline
| SubHeading | SubHeading
| SmallHeading
| MediumBody | MediumBody
| SmallBody | SmallBody
| SmallBodyGray | SmallBodyGray
@ -177,6 +187,12 @@ styles =
, fontWeight (int 700) , fontWeight (int 700)
, margin4 (px 20) (px 0) (px 10) (px 0) , margin4 (px 20) (px 0) (px 10) (px 0)
] ]
, Css.class SmallHeading
[ makeFont (px 16) gray20
, lineHeight (px 23)
, fontWeight (int 700)
, margin zero
]
, Css.class MediumBody , Css.class MediumBody
[ makeFont (px 18) gray20 [ makeFont (px 18) gray20
, lineHeight (px 27) , lineHeight (px 27)