Adds example markdown and plaintext

This commit is contained in:
Tessa Kelly 2021-10-21 16:49:44 -07:00
parent d12cb923be
commit 850c422f1f
2 changed files with 23 additions and 4 deletions

View File

@ -10,7 +10,6 @@ module Nri.Ui.Container.V2 exposing
- add remaining attributes to styleguide
- fix markdown extra-margins (if possible)
- adds optional default spacing?
- fix plaintext long and markdown long example content
- document changes from V1 (e.g., how to upgrade from V1)

View File

@ -47,7 +47,7 @@ example =
, Container.view (Container.default :: attributes)
, Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
[ Html.text "Gray Container" ]
, Html.text "A container that doesn't draw too much attention to itself."
, Html.text "A container that doesnt draw too much attention to itself."
, Container.view (Container.gray :: attributes)
, Heading.h3 [ Heading.css [ Css.marginTop (Css.px 8) ] ]
[ Html.text "Pillow Container" ]
@ -92,11 +92,11 @@ controlContent =
|> Control.map Container.plaintext
)
, ( "plain text (long)"
, Control.stringTextarea "TODO: Think of some good long plain text content!"
, Control.stringTextarea romeoAndJulietQuotation
|> Control.map Container.plaintext
)
, ( "markdown"
, Control.string "TODO: Think of some good markdown content!"
, Control.string romeoAndJulietQuotation
|> Control.map Container.markdown
)
, ( "HTML (short)"
@ -112,6 +112,26 @@ controlContent =
]
romeoAndJulietQuotation : String
romeoAndJulietQuotation =
"""
Two households, both alike in dignity,
In fair Verona, where we lay our scene,
From ancient grudge break to new mutiny,
Where civil blood makes civil hands unclean.
From forth the fatal loins of these two foes
A pair of star-crossd lovers take their life;
Whose misadventured piteous overthrows
Do with their death bury their parents strife.
The fearful passage of their death-markd love,
And the continuance of their parents rage,
Which, but their childrens end, nought could remove,
Is now the two hours traffic of our stage;
The which if you with patient ears attend,
What here shall miss, our toil shall strive to mend.
"""
{-| -}
type Msg
= UpdateControl (Control (List (Container.Attribute Msg)))