diff --git a/src/Nri/Ui/PremiumCheckbox/V7.elm b/src/Nri/Ui/PremiumCheckbox/V7.elm index e3f11c46..d918730c 100644 --- a/src/Nri/Ui/PremiumCheckbox/V7.elm +++ b/src/Nri/Ui/PremiumCheckbox/V7.elm @@ -2,6 +2,7 @@ module Nri.Ui.PremiumCheckbox.V7 exposing ( view , selected, partiallySelected , premium, showPennant + , disabled, enabled ) {-| @@ -20,6 +21,12 @@ module Nri.Ui.PremiumCheckbox.V7 exposing @docs premium, showPennant + +### Attributes + +@docs Attribute +@docs disabled, enabled + -} import Accessibility.Styled as Html exposing (Html) @@ -34,6 +41,20 @@ import String exposing (toLower) import String.Extra exposing (dasherize) +{-| This disables the input +-} +disabled : Attribute msg +disabled = + Attribute <| \config -> { config | isDisabled = True } + + +{-| This enables the input, this is the default behavior +-} +enabled : Attribute msg +enabled = + Attribute <| \config -> { config | isDisabled = False } + + {-| Lock Premium content if the user does not have Premium. -} premium : diff --git a/styleguide-app/Examples/Checkbox.elm b/styleguide-app/Examples/Checkbox.elm index 585c2178..e341af7d 100644 --- a/styleguide-app/Examples/Checkbox.elm +++ b/styleguide-app/Examples/Checkbox.elm @@ -185,10 +185,6 @@ viewPremiumCheckboxes state = Html.div [] [ PremiumCheckbox.view { label = "Identify Adjectives 1 (Premium)" - - --, disabled = False - --, isLocked = False - --, isPremium = True , onChange = ToggleCheck "premium-1" } [ PremiumCheckbox.premium @@ -200,10 +196,6 @@ viewPremiumCheckboxes state = ] , PremiumCheckbox.view { label = "Identify Adjectives 2 (Free)" - - --, disabled = False - --, isLocked = False - --, isPremium = False , onChange = ToggleCheck "premium-2" } [ PremiumCheckbox.premium @@ -215,10 +207,6 @@ viewPremiumCheckboxes state = ] , PremiumCheckbox.view { label = "Revising Wordy Phrases 3 (Premium, Disabled)" - - --, disabled = True - --, isLocked = True - --, isPremium = True , onChange = ToggleCheck "premium-3" } [ PremiumCheckbox.premium