mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2025-01-04 12:47:53 +03:00
💀 remove noOpMsg
This commit is contained in:
parent
306e414514
commit
1d51b1c659
@ -6,6 +6,11 @@ module Nri.Ui.Checkbox.V5 exposing
|
||||
|
||||
{-|
|
||||
|
||||
|
||||
# Changes from V5:
|
||||
|
||||
- Removes `noOpMsg` from Model
|
||||
|
||||
@docs Model, Theme, IsSelected
|
||||
|
||||
@docs view, viewWithLabel, Assets
|
||||
@ -41,7 +46,6 @@ type alias Model msg =
|
||||
, selected : IsSelected
|
||||
, disabled : Bool
|
||||
, theme : Theme
|
||||
, noOpMsg : msg
|
||||
}
|
||||
|
||||
|
||||
@ -265,11 +269,8 @@ viewCheckbox model config =
|
||||
]
|
||||
, config.containerClasses
|
||||
, Attributes.id <| model.identifier ++ "-container"
|
||||
, -- This is necessary to prevent event propagation.
|
||||
-- See https://github.com/elm-lang/html/issues/96
|
||||
Attributes.map (always model.noOpMsg) <|
|
||||
Events.stopPropagationOn "click"
|
||||
(Json.Decode.succeed ( "stop click propagation", True ))
|
||||
, Events.stopPropagationOn "click"
|
||||
(Json.Decode.fail "stop click propagation")
|
||||
]
|
||||
[ Html.checkbox model.identifier
|
||||
(selectedToMaybe model.selected)
|
||||
|
@ -30,7 +30,6 @@ type alias PremiumConfig msg =
|
||||
, pennant : Maybe Pennant
|
||||
, onChange : Bool -> msg
|
||||
, onLockedClick : msg
|
||||
, noOpMsg : msg
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +68,6 @@ premium assets config =
|
||||
|
||||
else
|
||||
Checkbox.Square
|
||||
, noOpMsg = config.noOpMsg
|
||||
}
|
||||
, case config.pennant of
|
||||
Just pennant ->
|
||||
|
@ -94,7 +94,6 @@ viewInteractableCheckbox id state =
|
||||
, selected = isSelected id state
|
||||
, disabled = False
|
||||
, theme = Checkbox.Square
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +107,6 @@ viewIndeterminateCheckbox id state =
|
||||
, selected = Checkbox.PartiallySelected
|
||||
, disabled = True
|
||||
, theme = Checkbox.Square
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
|
||||
|
||||
@ -122,7 +120,6 @@ viewLockedOnInsideCheckbox id state =
|
||||
, selected = Checkbox.NotSelected
|
||||
, disabled = True
|
||||
, theme = Checkbox.Locked
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
|
||||
|
||||
@ -136,7 +133,6 @@ viewDisabledCheckbox id state =
|
||||
, selected = isSelected id state
|
||||
, disabled = True
|
||||
, theme = Checkbox.Square
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
|
||||
|
||||
@ -153,7 +149,6 @@ viewMultilineCheckboxes =
|
||||
, selected = Checkbox.NotSelected
|
||||
, disabled = False
|
||||
, theme = Checkbox.Square
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
, Checkbox.viewWithLabel
|
||||
assets
|
||||
@ -163,7 +158,6 @@ viewMultilineCheckboxes =
|
||||
, selected = Checkbox.PartiallySelected
|
||||
, disabled = True
|
||||
, theme = Checkbox.Square
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
, Checkbox.viewWithLabel
|
||||
assets
|
||||
@ -173,7 +167,6 @@ viewMultilineCheckboxes =
|
||||
, selected = Checkbox.NotSelected
|
||||
, disabled = True
|
||||
, theme = Checkbox.Locked
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
, Checkbox.viewWithLabel
|
||||
assets
|
||||
@ -183,7 +176,6 @@ viewMultilineCheckboxes =
|
||||
, selected = Checkbox.NotSelected
|
||||
, disabled = True
|
||||
, theme = Checkbox.Square
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
]
|
||||
|
||||
@ -207,7 +199,6 @@ viewPremiumCheckboxes state =
|
||||
, pennant = config.pennant
|
||||
, onChange = ToggleCheck config.label
|
||||
, onLockedClick = NoOp
|
||||
, noOpMsg = NoOp
|
||||
}
|
||||
in
|
||||
Html.div []
|
||||
|
Loading…
Reference in New Issue
Block a user