Allow setting custom ID property on PremiumCheckbox

Note, this fixes a regression introduced V6 -> V7
This commit is contained in:
Casey Webb 2022-03-11 00:33:03 -06:00
parent 7ee0ef1fba
commit 1844d0cc04
No known key found for this signature in database
GPG Key ID: 48642A5DE0C82442

View File

@ -1,5 +1,6 @@
module Nri.Ui.PremiumCheckbox.V8 exposing
( view
, id
, selected, partiallySelected
, premium, showPennant
, Attribute
@ -39,6 +40,15 @@ import String exposing (toLower)
import String.Extra exposing (dasherize)
{-| Set a custom ID for this checkbox and label. If you don't set this,
we'll automatically generate one from the label you pass in, but this can
cause problems if you have more than one checkbox with the same label on
the page. Use this to be more specific and avoid issues with duplicate IDs!
-}
id : String -> Attribute msg
id id_ =
Attribute (\config -> { config | id = Just id_ })
{-| This disables the input
-}
disabled : Attribute msg