aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Model')
-rw-r--r--src/client/elm/Model/Size.elm17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/elm/Model/Size.elm b/src/client/elm/Model/Size.elm
new file mode 100644
index 0000000..b29e90b
--- /dev/null
+++ b/src/client/elm/Model/Size.elm
@@ -0,0 +1,17 @@
+module Model.Size exposing
+ ( Size
+ , sizeDecoder
+ )
+
+import Json.Decode as Json exposing ((:=))
+
+type alias Size =
+ { width: Int
+ , height: Int
+ }
+
+sizeDecoder : Json.Decoder Size
+sizeDecoder =
+ Json.object2 Size
+ ("width" := Json.int)
+ ("height" := Json.int)