From 05e8f89df4bb22ebce145ef4889d3b8d79e6bdda Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Thu, 24 Mar 2022 14:56:36 -0700 Subject: [PATCH] Begin switching to shared debug view --- styleguide-app/Examples/SegmentedControl.elm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/styleguide-app/Examples/SegmentedControl.elm b/styleguide-app/Examples/SegmentedControl.elm index aed71516..fa9b6083 100644 --- a/styleguide-app/Examples/SegmentedControl.elm +++ b/styleguide-app/Examples/SegmentedControl.elm @@ -17,6 +17,7 @@ import Browser.Dom as Dom import Category exposing (Category(..)) import Css import Debug.Control as Control exposing (Control) +import Debug.Control.View as ControlView import Example exposing (Example) import Html.Styled.Attributes exposing (css) import KeyboardSupport exposing (Key(..)) @@ -46,8 +47,15 @@ example = options = Control.currentValue state.optionsControl in - [ Control.view ChangeOptions state.optionsControl - |> Html.fromUnstyled + [ ControlView.view + { update = ChangeOptions + , settings = state.optionsControl + , toExampleCode = + \settings -> + [ { sectionName = "view", code = "TODO" } + , { sectionName = "viewRadioGroup", code = "TODO" } + ] + } , Html.h3 [ css [ Css.marginBottom Css.zero ] ] [ Html.code [] [ Html.text "view" ] ] , Html.p [ css [ Css.marginTop (Css.px 1) ] ]