From 9dfa7a7e2c6fac564a456b11623c04d0b26fbce5 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 4 Jun 2016 10:04:05 +0200 Subject: Add search on payments and use inline font awesome from elm --- src/client/elm/LoggedIn/Home/View/Expand.elm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/client/elm/LoggedIn/Home/View/Expand.elm') diff --git a/src/client/elm/LoggedIn/Home/View/Expand.elm b/src/client/elm/LoggedIn/Home/View/Expand.elm index a50ebfe..e0c13a3 100644 --- a/src/client/elm/LoggedIn/Home/View/Expand.elm +++ b/src/client/elm/LoggedIn/Home/View/Expand.elm @@ -3,25 +3,27 @@ module LoggedIn.Home.View.Expand exposing , ExpandType(..) ) +import Color exposing (Color) + +import FontAwesome + import Html exposing (..) import Html.Attributes exposing (..) import Msg exposing (Msg) -import View.Icon exposing (renderIcon) - type ExpandType = ExpandUp | ExpandDown expand : ExpandType -> Bool -> Html Msg expand expandType isExpanded = div [ class "expand" ] - [ renderIcon (chevronIcon expandType isExpanded) ] + [ (chevronIcon expandType isExpanded) Color.white 15 ] -chevronIcon : ExpandType -> Bool -> String +chevronIcon : ExpandType -> Bool -> (Color -> Int -> Html msg) chevronIcon expandType isExpanded = case (expandType, isExpanded) of - (ExpandUp, True) -> "chevron-down" - (ExpandUp, False) -> "chevron-up" - (ExpandDown, True) -> "chevron-up" - (ExpandDown, False) -> "chevron-down" + (ExpandUp, True) -> FontAwesome.chevron_down + (ExpandUp, False) -> FontAwesome.chevron_up + (ExpandDown, True) -> FontAwesome.chevron_up + (ExpandDown, False) -> FontAwesome.chevron_down -- cgit v1.2.3