git.iko.soy/typeable/elm-ui
on master help sign in
resolves #169 - add proper imports to paragraph example
commitdb8ff2b7e566a8830909a8ac4d1be879cb6a5c47 authorElm UI Automation <automation@elm-ui.com> dateSat 16 May 2020, 12:47 (6 years ago) parent2f192bd
1 file changed+16−14
src/Element.elm+16−14
src/Element.elm+16−14
@@ -988,14 +988,15 @@ tableHelper attrs config =
988988
989989{-| A paragraph will layout all children as wrapped, inline elements.
990990
991− import Element
991+ import Element exposing (el, paragraph, text)
992992 import Element.Font as Font
993993
994− Element.paragraph []
995− [ text "lots of text ...."
996− , el [ Font.bold ] (text "this is bold")
997− , text "lots of text ...."
998− ]
994+ view =
995+ paragraph []
996+ [ text "lots of text ...."
997+ , el [ Font.bold ] (text "this is bold")
998+ , text "lots of text ...."
999+ ]
9991000
10001001This is really useful when you want to markup text by having some parts be bold, or some be links, or whatever you so desire.
10011002
@@ -1003,17 +1004,18 @@ Also, if a child element has `alignLeft` or `alignRight`, then it will be moved
10031004
10041005This makes it particularly easy to do something like a [dropped capital](https://en.wikipedia.org/wiki/Initial).
10051006
1006− import Element
1007+ import Element exposing (alignLeft, el, padding, paragraph, text)
10071008 import Element.Font as Font
10081009
1009− Element.paragraph []
1010− [ el
1011− [ alignLeft
1012− , padding 5
1010+ view =
1011+ paragraph []
1012+ [ el
1013+ [ alignLeft
1014+ , padding 5
1015+ ]
1016+ (text "S")
1017+ , text "o much text ...."
10131018 ]
1014− (text "S")
1015− , text "o much text ...."
1016− ]
10171019
10181020Which will look something like
10191021