mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-23 20:03:31 +03:00
25 lines
319 B
Elm
25 lines
319 B
Elm
module View exposing (View, map)
|
|
|
|
{-|
|
|
|
|
@docs View, map
|
|
|
|
-}
|
|
|
|
import Html exposing (Html)
|
|
|
|
|
|
{-| -}
|
|
type alias View msg =
|
|
{ title : String
|
|
, body : List (Html msg)
|
|
}
|
|
|
|
|
|
{-| -}
|
|
map : (msg1 -> msg2) -> View msg1 -> View msg2
|
|
map fn doc =
|
|
{ title = doc.title
|
|
, body = List.map (Html.map fn) doc.body
|
|
}
|