module View.Header ( renderHeader ) where import Signal exposing (Address) import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) import Model exposing (Model) import Model.Translations exposing (getMessage) import Model.Communication as Communication import Model.Action exposing (..) import Model.View exposing (..) import View.Icon exposing (renderIcon) renderHeader : Address Action -> Model -> Html renderHeader address model = header [] [ h1 [] [ text (getMessage "SharedCost" model.translations) ] , case model.view of LoggedInView _ -> button [ class "icon" , onClick address (ServerCommunication Communication.SignOut) ] [ renderIcon "power-off" ] _ -> text "" ]