Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
zlu
zlu.me
Commits
58b9e2e2
Commit
58b9e2e2
authored
Jul 15, 2016
by
zlu
🤸🏿
Browse files
user can roll dice
parent
0d4b813c
Changes
2
Hide whitespace changes
Inline
Side-by-side
elm-package.json
View file @
58b9e2e2
...
...
@@ -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
}
random-number.elm
View file @
58b9e2e2
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment