aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model/Size.elm
blob: b29e90be39817838f1c486e57088c72f57faa773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)