Skip to content

Instantly share code, notes, and snippets.

@knewter
Created August 9, 2016 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knewter/732aef7d896f0d0b075a2b304506c9b7 to your computer and use it in GitHub Desktop.
Save knewter/732aef7d896f0d0b075a2b304506c9b7 to your computer and use it in GitHub Desktop.
Introduction to elm-mdl - 3
import Material.Layout as Layout
view : Model -> Html Msg
view model =
Layout.render Mdl
model.mdl
[ Layout.fixedHeader
]
{ header = [ h1 [ style [ ( "padding", "2rem" ) ] ] [ text "Counter" ] ]
, drawer = []
, tabs = ( [], [] )
, main = [ viewBody model ]
}
-- This used to be the `view`
viewBody : Model -> Html Msg
viewBody model =
-- ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment