From 4faffae6db2610b9614b044797b32ad071f2481c Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Thu, 4 Apr 2019 11:38:34 -0700 Subject: [PATCH] Reorganize the file a bit --- src/Nri/Ui/Checkbox/V5.elm | 72 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Nri/Ui/Checkbox/V5.elm b/src/Nri/Ui/Checkbox/V5.elm index dcf163a7..8dab38c4 100644 --- a/src/Nri/Ui/Checkbox/V5.elm +++ b/src/Nri/Ui/Checkbox/V5.elm @@ -126,42 +126,6 @@ buildCheckbox model labelView = viewLockedCheckbox model labelView -positioning : Style -positioning = - batch - [ display inlineBlock - , padding4 (px 13) zero (px 13) (px 35) - ] - - -textStyle : Style -textStyle = - batch - [ Fonts.baseFont - , fontSize (px 16) - , fontWeight (int 600) - , color Colors.navy - ] - - -labelClass : IsSelected -> Html.Styled.Attribute msg -labelClass isSelected = - case isSelected of - Selected -> - toClassList [ "Label", "Checked" ] - - NotSelected -> - toClassList [ "Label", "Unchecked" ] - - PartiallySelected -> - toClassList [ "Label", "Indeterminate" ] - - -toClassList : List String -> Html.Styled.Attribute msg -toClassList = - List.map (\a -> ( "checkbox-V3__" ++ a, True )) >> Attributes.classList - - viewSquareCheckbox : Model msg -> (String -> Html.Html msg) -> Html.Html msg viewSquareCheckbox model labelView = let @@ -300,6 +264,42 @@ viewDisabledLabel model labelView icon = ] +labelClass : IsSelected -> Html.Styled.Attribute msg +labelClass isSelected = + case isSelected of + Selected -> + toClassList [ "Label", "Checked" ] + + NotSelected -> + toClassList [ "Label", "Unchecked" ] + + PartiallySelected -> + toClassList [ "Label", "Indeterminate" ] + + +toClassList : List String -> Html.Styled.Attribute msg +toClassList = + List.map (\a -> ( "checkbox-V5__" ++ a, True )) >> Attributes.classList + + +positioning : Style +positioning = + batch + [ display inlineBlock + , padding4 (px 13) zero (px 13) (px 35) + ] + + +textStyle : Style +textStyle = + batch + [ Fonts.baseFont + , fontSize (px 16) + , fontWeight (int 600) + , color Colors.navy + ] + + viewIcon : List Style -> Icon -> Html.Html msg viewIcon styles (Icon icon) = Html.div