@@ -0,0 +1,86 @@
1+module Other exposing (main)
4+import Element exposing (..)
5+import Element.Border as Border
6+import Element.Events as Events
7+import Html exposing (Html)
25+update : Msg -> Model -> Model
29+ { model | count = model.count + 1 }
32+ { model | count = model.count - 1 }
35+view : Model -> Html Msg
41+viewElements : Model -> Element Msg
43+ el [ height fill ] <|
44+ column [ height fill ]
46+ [ height (fillPortion 1)
51+ [ height (fillPortion 2)
58+flexBasisZero : Element.Attribute msg
60+ htmlAttribute (Html.Attributes.style "flex-basis" "0")
63+viewCounters : Model -> Element Msg
65+ column [ height fill ]
66+ (List.repeat model.count model
67+ |> List.map viewCounter
71+viewCounter : Model -> Element Msg
73+ column [ width fill, height fill, Border.width 1, Border.dotted ]
74+ [ el [ Events.onClick Increment, Border.width 1, Border.rounded 3 ] <| text "+1"
75+ , el [] <| text <| String.fromInt model.count
76+ , el [ Events.onClick Decrement, Border.width 1, Border.rounded 3 ] <| text "-1"
80+main : Program () Model Msg
83+ { init = initialModel