Solution to intro/part2

This commit is contained in:
Richard Feldman
2018-08-14 01:49:18 -04:00
parent aed9d1aa5c
commit a329bd2f40

View File

@@ -7,18 +7,13 @@ import Html.Attributes exposing (..)
viewTags tags = viewTags tags =
let let
renderedTags = renderedTags =
-- 👉 TODO: use `List.map` and `viewTag` to render the tags List.map viewTag tags
[]
in in
div [ class "tag-list" ] renderedTags div [ class "tag-list" ] renderedTags
viewTag tagName = viewTag tagName =
{- 👉 TODO: render something like this: button [ class "tag-pill tag-default" ] [ text tagName ]
<button class="tag-pill tag-default">tag name goes here</button>
-}
button [] []
main = main =
@@ -34,9 +29,7 @@ main =
, div [ class "col-md-3" ] , div [ class "col-md-3" ]
[ div [ class "sidebar" ] [ div [ class "sidebar" ]
[ p [] [ text "Popular Tags" ] [ p [] [ text "Popular Tags" ]
, viewTags tags
-- 👉 TODO: instead of passing [] to viewTags, pass the actual tags
, viewTags []
] ]
] ]
] ]