From f4cb7fdc56e4dbf48f086e07db2ed52540e40c0f Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Tue, 12 Apr 2022 17:23:24 -0700 Subject: [PATCH] More reasonable icon default --- styleguide-app/CommonControls.elm | 4 ++-- styleguide-app/Examples/Accordion.elm | 25 ++++++++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/styleguide-app/CommonControls.elm b/styleguide-app/CommonControls.elm index ce9f0629..f203bb18 100644 --- a/styleguide-app/CommonControls.elm +++ b/styleguide-app/CommonControls.elm @@ -2,7 +2,7 @@ module CommonControls exposing ( css, mobileCss, quizEngineMobileCss, notMobileCss , choice , icon, iconNotCheckedByDefault, uiIcon - , content + , content, exampleHtml , httpError , disabledListItem, premiumDisplay ) @@ -16,7 +16,7 @@ module CommonControls exposing ### Content -@docs content +@docs content, exampleHtml @docs httpError -} diff --git a/styleguide-app/Examples/Accordion.elm b/styleguide-app/Examples/Accordion.elm index 5a765d22..fccbb1e4 100644 --- a/styleguide-app/Examples/Accordion.elm +++ b/styleguide-app/Examples/Accordion.elm @@ -348,13 +348,24 @@ initSettings = controlIcon : Control ( String, Bool -> Html Msg ) controlIcon = - Control.map - (\( code, icon ) -> - ( "\\_ -> Svg.toHtml " ++ code - , \_ -> Svg.toHtml icon - ) - ) - CommonControls.uiIcon + Control.choice + [ ( "none", Control.value ( "\\_ -> text \"\"", \_ -> Html.text "" ) ) + , ( "DisclosureIndicator" + , Control.value + ( "DisclosureIndicator.large [ Css.marginRight (Css.px 8) ]" + , DisclosureIndicator.large [ Css.marginRight (Css.px 8) ] + ) + ) + , ( "UiIcon" + , Control.map + (\( code, icon ) -> + ( "\\_ -> Svg.toHtml " ++ code + , \_ -> Svg.toHtml icon + ) + ) + CommonControls.uiIcon + ) + ] controlHeaderContent : Control ( String, Html Msg )