Commit 58b9e2e2 authored by zlu's avatar zlu 🤸🏿
Browse files

user can roll dice

parent 0d4b813c
......@@ -9,7 +9,8 @@
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "4.0.1 <= v < 5.0.0",
"elm-lang/html": "1.1.0 <= v < 2.0.0"
"elm-lang/html": "1.1.0 <= v < 2.0.0",
"elm-lang/svg": "1.1.0 <= v < 2.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}
\ No newline at end of file
}
......@@ -2,6 +2,8 @@ import Html exposing (..)
import Html.Events exposing (onClick)
import Html.App as App
import Random
import Svg exposing (..)
import Svg.Attributes exposing (..)
main =
App.program
......@@ -29,8 +31,8 @@ update msg model =
view : Model -> Html Msg
view model =
div []
[ h1 [] [ text (toString model.dieFace) ],
button [ onClick Roll ] [ text "Roll" ]
[ h1 [] [ Html.text (toString model.dieFace) ]
, button [ onClick Roll ] [ Html.text "Roll" ]
]
subscriptions : Model -> Sub Msg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment