on master help sign in
x230/src/View.elm
23 lines 434 B history raw
1module View exposing (View, map, placeholder)
3import Element exposing (Element)
6type alias View msg =
7 { title : String
8 , body : Element msg
9 }
12map : (msg1 -> msg2) -> View msg1 -> View msg2
13map fn doc =
14 { title = doc.title
15 , body = Element.map fn doc.body
16 }
19placeholder : String -> View msg
20placeholder moduleName =
21 { title = "Placeholder - " ++ moduleName
22 , body = Element.text moduleName
23 }