From a1fc268d5eeab236396e173e91d1c35dbb8f1b56 Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Wed, 23 Mar 2022 10:46:12 -0700 Subject: [PATCH] Adds example code for Text examples --- styleguide-app/Examples/Text.elm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/styleguide-app/Examples/Text.elm b/styleguide-app/Examples/Text.elm index 573a5dc8..bab7d36b 100644 --- a/styleguide-app/Examples/Text.elm +++ b/styleguide-app/Examples/Text.elm @@ -40,7 +40,7 @@ example = \state -> let attributes = - Control.currentValue state.control + List.map Tuple.second (Control.currentValue state.control) in [ Text.caption [ Text.plaintext "NOTE: When using these styles, please read the documentation in the Elm module about \"Understanding spacing\"" ] , ControlView.view @@ -55,7 +55,7 @@ example = "Text." ++ name ++ "\n [ " - ++ "\n TODO" + ++ String.join "\n , " (List.map Tuple.first settings) ++ "\n ]" } in @@ -102,7 +102,7 @@ viewExamples examples attributes = {-| -} type alias State = - { control : Control (List (Text.Attribute Msg)) + { control : Control (List ( String, Text.Attribute Msg )) } @@ -115,7 +115,6 @@ init = |> ControlExtra.optionalBoolListItem "noBreak" ( "Text.noBreak True", Text.noBreak True ) |> CommonControls.css { moduleName = "Text", use = Text.css } - |> Control.map (List.map Tuple.second) } @@ -132,7 +131,7 @@ controlContent = {-| -} type Msg - = UpdateControl (Control (List (Text.Attribute Msg))) + = UpdateControl (Control (List ( String, Text.Attribute Msg ))) {-| -}