From c5027f6ce0f5fa9f4e6f0f3a6cdbd93ed651364a Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Tue, 14 Aug 2018 01:59:19 -0400 Subject: [PATCH] Update intro/part4 --- intro/part4/src/Main.elm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/intro/part4/src/Main.elm b/intro/part4/src/Main.elm index ba447ff..0f7f04c 100644 --- a/intro/part4/src/Main.elm +++ b/intro/part4/src/Main.elm @@ -7,6 +7,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (onClick) + -- MODEL @@ -56,6 +57,7 @@ type alias Msg = update msg model = if msg.description == "ClickedTag" then { model | selectedTag = msg.data } + else model @@ -101,9 +103,8 @@ viewArticle article = ] -{-| 👉 TODO: Replace this comment with a type annotation for `view` +{-| 👉 TODO: Replace this comment with a type annotation for `viewBanner` -} -viewBanner : Html Msg viewBanner = div [ class "banner" ] [ div [ class "container" ] @@ -113,13 +114,14 @@ viewBanner = ] -{-| 👉 TODO: Replace this comment with a type annotation for `view` +{-| 👉 TODO: Replace this comment with a type annotation for `viewTag` -} viewTag selectedTagName tagName = let otherClass = if tagName == selectedTagName then "tag-selected" + else "tag-default" in