This checkbox is super specific. simplify the api

This commit is contained in:
Tessa Kelly 2018-06-15 11:58:35 -07:00
parent de07e1d3c8
commit 78eb234ab2

View File

@ -5,7 +5,6 @@ module Nri.Ui.Checkbox.V3
, Model
, PremiumConfig
, Theme(..)
, disabled
, premium
, styles
, view
@ -16,7 +15,7 @@ module Nri.Ui.Checkbox.V3
@docs Model, Theme, ColorTheme
@docs view, viewWithLabel, disabled
@docs view, viewWithLabel
## Premium
@ -106,30 +105,6 @@ viewWithLabel assets model =
Html.span [] [ Html.text model.label ]
{-| Show a disabled checkbox.
-}
disabled : String -> String -> RootHtml.Html msg
disabled identifier labelText =
span
[ styles.class [ Container, SquareClass, Opacified ]
, RootAttributes.id <| identifier ++ "-container"
]
[ checkbox identifier
(Just False)
[ Accessibility.Widget.label labelText
, styles.class [ Checkbox ]
, RootAttributes.id identifier
, RootAttributes.disabled True
]
, label
[ RootAttributes.for identifier
, styles.class [ Label, Indeterminate ]
]
[ RootHtml.text labelText
]
]
{-|
- `onChange`: A message for when the user toggles the checkbox