diff --git a/src/Nri/Ui/RadioButton/V3.elm b/src/Nri/Ui/RadioButton/V3.elm index 7e4123c3..826db4ca 100644 --- a/src/Nri/Ui/RadioButton/V3.elm +++ b/src/Nri/Ui/RadioButton/V3.elm @@ -120,8 +120,7 @@ emptyEventsAndValues = {-| This is private. The public API only exposes `Attribute`. -} type alias Config = - { label : Maybe String - , name : Maybe String + { name : Maybe String , isLocked : Bool , isDisabled : Bool , showPennant : Bool @@ -130,8 +129,7 @@ type alias Config = emptyConfig : Config emptyConfig = - { label = Nothing - , name = Nothing + { name = Nothing , isLocked = False , isDisabled = False , showPennant = False @@ -173,13 +171,12 @@ applyEvents = If used in a group, all radio buttons in the group should have the same name attribute. -} view : - { label : String - } + String -> List (Attribute value msg) -> Html msg -view config = +view label = internalView - { label = config.label + { label = label , isLocked = False , premiumMsg = Nothing , showPennant = False diff --git a/styleguide-app/Examples/RadioButton.elm b/styleguide-app/Examples/RadioButton.elm index 9b33ca39..4e05ed70 100644 --- a/styleguide-app/Examples/RadioButton.elm +++ b/styleguide-app/Examples/RadioButton.elm @@ -86,8 +86,7 @@ viewVanilla : State -> Html Msg viewVanilla state = div [] [ RadioButton.view - { label = selectionToString Dogs - } + (selectionToString Dogs) [ RadioButton.enabled , RadioButton.value Dogs , RadioButton.name "pets" @@ -96,8 +95,7 @@ viewVanilla state = , RadioButton.valueToString selectionToString ] , RadioButton.view - { label = selectionToString Cats - } + (selectionToString Cats) [ RadioButton.enabled , RadioButton.value Cats , RadioButton.name "pets" @@ -106,8 +104,7 @@ viewVanilla state = , RadioButton.valueToString selectionToString ] , RadioButton.view - { label = selectionToString Robots - } + (selectionToString Robots) [ RadioButton.disabled , RadioButton.value Robots , RadioButton.name "pets"