module LoggedIn.Home.View.Expand exposing ( expand , ExpandType(..) ) import Color exposing (Color) import FontAwesome import Html exposing (..) import Html.Attributes exposing (..) import Msg exposing (Msg) type ExpandType = ExpandUp | ExpandDown expand : ExpandType -> Bool -> Html Msg expand expandType isExpanded = div [ class "expand" ] [ (chevronIcon expandType isExpanded) Color.white 15 ] chevronIcon : ExpandType -> Bool -> (Color -> Int -> Html msg) chevronIcon expandType isExpanded = case (expandType, isExpanded) of (ExpandUp, True) -> FontAwesome.chevron_down (ExpandUp, False) -> FontAwesome.chevron_up (ExpandDown, True) -> FontAwesome.chevron_up (ExpandDown, False) -> FontAwesome.chevron_down