Update intro/part4

This commit is contained in:
Richard Feldman
2018-08-14 01:59:19 -04:00
parent 8abd06f233
commit c5027f6ce0

View File

@@ -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