A collection of helpers for dealing with elm-mdl render functions. This is motivated by the following observations:
Mdl index model.mdloccurs frequently in elm-mdl.
viewButton model index = Button.render Mdl (0 :: index) model.mdl [ Button.onClick Increment ] [ text "Add" ]
viewButton context model = (Button.render |> withIndex context 0) [ Button.onClick Increment ] [ text "Add" ]
There is a simple example with a couple of counters:
$ cd example $ elm-make App.elm