From 5600383d5d3ddca5263bf43a35537757d67c702f Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Mon, 22 Nov 2021 11:04:43 -0800 Subject: [PATCH] Move name into list of controlled attribtues --- styleguide-app/Examples/RadioButton.elm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/styleguide-app/Examples/RadioButton.elm b/styleguide-app/Examples/RadioButton.elm index 47117118..0f717268 100644 --- a/styleguide-app/Examples/RadioButton.elm +++ b/styleguide-app/Examples/RadioButton.elm @@ -98,7 +98,6 @@ viewRadioButtons selectionSettings selectedValue = [ RadioButton.view (selectionToString Dogs) ([ RadioButton.value Dogs - , RadioButton.name "pets" , RadioButton.selectedValue selectedValue , RadioButton.onSelect Select , RadioButton.valueToString selectionToString @@ -110,7 +109,6 @@ viewRadioButtons selectionSettings selectedValue = , RadioButton.view (selectionToString Cats) ([ RadioButton.value Cats - , RadioButton.name "pets" , RadioButton.selectedValue selectedValue , RadioButton.onSelect Select , RadioButton.valueToString selectionToString @@ -134,7 +132,6 @@ viewRadioButtons selectionSettings selectedValue = , RadioButton.view (selectionToString Robots) ([ RadioButton.value Robots - , RadioButton.name "pets" , RadioButton.selectedValue selectedValue , RadioButton.onSelect Select , RadioButton.valueToString selectionToString @@ -202,6 +199,16 @@ initSelectionSettings = controlAttributes : Control (List ( String, RadioButton.Attribute Selection Msg )) controlAttributes = ControlExtra.list + |> ControlExtra.listItem "name" + (Control.choice + [ ( "pets" + , Control.value + ( "RadioButton.name \"pets\"" + , RadioButton.name "pets" + ) + ) + ] + ) |> ControlExtra.listItem "disabled" disabledOrEnabled |> ControlExtra.optionalListItem "showPennant" showPennant |> ControlExtra.optionalListItem "premium"