This repository has been archived on 2024-04-17. You can view files and clone it, but cannot push or open issues/pull-requests.
elm-comment-layout-exploration/src/Comment.elm

23 lines
523 B
Elm

module Comment exposing (Comment, view)
import Html exposing (Html)
import Html.Attributes as Attrs
type alias Comment =
{ id : Int
, height : Int
}
view : Comment -> Html msg
view { height, id } =
Html.div
[ Attrs.style "width" "150px"
, Attrs.style "height" (String.fromInt height ++ "px")
, Attrs.style "border" "1px solid blue"
, Attrs.style "border-radius" "10px"
, Attrs.style "background-color" "white"
]
[ Html.text (String.fromInt id) ]