This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Helpers for working with elm-mdl render functions
version 2.0.0
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 2.0.0
Committed At 2018-03-27 18:17:18 UTC
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1
debois/elm-mdl 8.1.0 <= v < 9.0.0 8.1.0

Modules

README

A collection of helpers for dealing with elm-mdl render functions. This is motivated by the following observations:

  • The triplet of Mdl index model.mdl occurs frequently in elm-mdl.
  • Dealing with indices is a bit tedious.
viewButton model index =
    Button.render Mdl (0 :: index) model.mdl
        [ Button.onClick Increment ]
        [ text "Add" ]

This becomes

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