Making a call here -- we only use the pulsing for topic sentences, and that ui is probs going to change. long term this api should be nice and the pusling is not helping

This commit is contained in:
Tessa Kelly 2018-06-15 11:32:01 -07:00
parent e96f69a025
commit 23abc65573

View File

@ -9,7 +9,6 @@ module Nri.Ui.Checkbox.V3
, premium , premium
, styles , styles
, view , view
, viewAttention
, viewWithLabel , viewWithLabel
) )
@ -17,7 +16,7 @@ module Nri.Ui.Checkbox.V3
@docs Model, Theme, ColorTheme @docs Model, Theme, ColorTheme
@docs view, viewWithLabel, viewAttention, disabled @docs view, viewWithLabel, disabled
## Premium ## Premium
@ -204,14 +203,6 @@ premium assets config =
Html.span [] [ Html.text config.label ] Html.span [] [ Html.text config.label ]
{-| -}
viewAttention : Assets a -> Model msg -> Html.Html msg
viewAttention assets model =
buildCheckbox assets [ "WithPulsing" ] model <|
Html.span [ Accessibility.Styled.Style.invisible ]
[ Html.text model.label ]
buildCheckbox : Assets a -> List String -> Model msg -> Html.Html msg -> Html.Html msg buildCheckbox : Assets a -> List String -> Model msg -> Html.Html msg -> Html.Html msg
buildCheckbox assets modifierClasses model labelContent = buildCheckbox assets modifierClasses model labelContent =
let let
@ -352,15 +343,6 @@ buildCheckbox assets modifierClasses model labelContent =
-- that can't be indeterminate that we nonetheless -- that can't be indeterminate that we nonetheless
-- model as Maybes. what can you do. -- model as Maybes. what can you do.
[] []
, Css.batch <|
--WOW super brittle let's not do this, tessa
if modifierClasses == [ "WithPulsing" ] then
[ property "-webkit-animation" "pulsate 1s infinite"
, property "-moz-animation" "pulsate 1s infinite"
, property "animation" "pulsate 1s infinite"
]
else
[]
] ]
, labelClasses = labelClass model.selected , labelClasses = labelClass model.selected
, labelContent = labelContent , labelContent = labelContent
@ -518,7 +500,6 @@ type CssClasses
| LockOnInsideClass | LockOnInsideClass
| UnlockableClass | UnlockableClass
| Label | Label
| WithPulsing
| Opacified | Opacified
| PremiumClass | PremiumClass