Skip to content

Commit

Permalink
Add intro talk for Lunch and Learn.
Browse files Browse the repository at this point in the history
  • Loading branch information
abadi199 committed Aug 28, 2019
1 parent 1357141 commit def18dc
Show file tree
Hide file tree
Showing 11 changed files with 513 additions and 3 deletions.
2 changes: 1 addition & 1 deletion design/Port-Architecture.xcf
Git LFS file not shown
4 changes: 2 additions & 2 deletions design/Web-Component-Architecture.xcf
Git LFS file not shown
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"css": "parcel src/Css/index.html",
"js": "parcel src/Js/index.html --no-cache",
"slide": "parcel src/Slide/index.html --no-cache",
"intro": "parcel src/Intro/index.html --no-cache",
"slow": "parcel src/Caterpillar/slow.html --no-cache --no-hmr",
"fast": "parcel src/Caterpillar/fast.html --no-cache --no-hmr",
"elmOne": "parcel src/Elm/oneApple.html --no-cache",
Expand Down
54 changes: 54 additions & 0 deletions src/Intro/Tea.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
module Intro.Tea exposing (main)

import Browser
import Html exposing (Html, button, div, text)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)


main =
Browser.sandbox { init = 0, update = update, view = view }



-- MODEL


type alias Model =
Int



-- UPDATE


type Msg
= Increment
| Decrement


update msg model =
case msg of
Increment ->
model + 1

Decrement ->
model - 1



-- VIEW


view model =
div
[ style "display" "grid"
, style "width" "100px"
, style "grid-template-rows" "1fr 1fr 1fr"
, style "align-items" "center"
, style "margin" "auto"
]
[ button [ onClick Decrement ] [ text "-" ]
, div [] [ text (String.fromInt model) ]
, button [ onClick Increment ] [ text "+" ]
]
Loading

0 comments on commit def18dc

Please sign in to comment.