mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-28 18:24:04 +03:00
This checkbox is super specific. simplify the api
This commit is contained in:
parent
de07e1d3c8
commit
78eb234ab2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user