website/app/View.elm

25 lines
334 B
Elm
Raw Normal View History

2023-10-24 05:23:25 +07:00
module View exposing (View, map)
{-|
@docs View, map
-}
import Html.Styled as 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
}