mirror of
https://github.com/correl/elm-mdl.git
synced 2024-11-23 11:09:51 +00:00
Draft checkbox, switch, radio.
This commit is contained in:
parent
923256cffe
commit
103c74b880
2 changed files with 11 additions and 0 deletions
|
@ -27,6 +27,7 @@ import Demo.Textfields
|
|||
import Demo.Snackbar
|
||||
import Demo.Badges
|
||||
import Demo.Elevation
|
||||
import Demo.Toggles
|
||||
--import Demo.Template
|
||||
|
||||
|
||||
|
@ -76,6 +77,7 @@ type alias Model =
|
|||
, routing : Routing
|
||||
, buttons : Demo.Buttons.Model
|
||||
, textfields : Demo.Textfields.Model
|
||||
, toggles : Demo.Toggles.Model
|
||||
, snackbar : Demo.Snackbar.Model
|
||||
--, template : Demo.Template.Model
|
||||
}
|
||||
|
@ -87,6 +89,7 @@ model =
|
|||
, routing = route0
|
||||
, buttons = Demo.Buttons.model
|
||||
, textfields = Demo.Textfields.model
|
||||
, toggles = Demo.Toggles.model
|
||||
, snackbar = Demo.Snackbar.model
|
||||
--, template = Demo.Template.model
|
||||
}
|
||||
|
@ -105,6 +108,7 @@ type Action
|
|||
| ButtonsAction Demo.Buttons.Action
|
||||
| TextfieldAction Demo.Textfields.Action
|
||||
| SnackbarAction Demo.Snackbar.Action
|
||||
| TogglesAction Demo.Toggles.Action
|
||||
-- | TemplateAction Demo.Template.Action
|
||||
|
||||
|
||||
|
@ -148,6 +152,8 @@ update action model =
|
|||
|
||||
SnackbarAction a -> lift .snackbar (\m x->{m|snackbar =x}) SnackbarAction Demo.Snackbar.update a model
|
||||
|
||||
TogglesAction a -> lift .toggles (\m x->{m|toggles =x}) TogglesAction Demo.Toggles.update a model
|
||||
|
||||
--TemplateAction a -> lift .template (\m x->{m|template =x}) TemplateAction Demo.Template.update a model
|
||||
|
||||
|
||||
|
@ -207,6 +213,8 @@ tabs =
|
|||
Demo.Snackbar.view (Signal.forwardTo addr SnackbarAction) model.snackbar)
|
||||
, ("Textfields", "textfields", \addr model ->
|
||||
Demo.Textfields.view (Signal.forwardTo addr TextfieldAction) model.textfields)
|
||||
, ("Toggles", "toggles", \addr model ->
|
||||
Demo.Toggles.view (Signal.forwardTo addr TogglesAction) model.toggles)
|
||||
--, ("Template", "tempate", \addr model ->
|
||||
-- Demo.Template.view (Signal.forwardTo addr TemplateAction) model.template)
|
||||
]
|
||||
|
|
|
@ -170,6 +170,7 @@ import Effects exposing (Effects)
|
|||
import Material.Button as Button
|
||||
import Material.Textfield as Textfield
|
||||
import Material.Snackbar as Snackbar
|
||||
import Material.Toggles as Toggles
|
||||
import Material.Component as Component exposing (Indexed)
|
||||
--import Material.Template as Template
|
||||
|
||||
|
@ -181,6 +182,7 @@ type alias Model =
|
|||
{ button : Indexed Button.Model
|
||||
, textfield : Indexed Textfield.Model
|
||||
, snackbar : Maybe (Snackbar.Model Int)
|
||||
, toggles : Indexed Toggles.Model
|
||||
-- , template : Indexed Template.Model
|
||||
}
|
||||
|
||||
|
@ -192,6 +194,7 @@ model =
|
|||
{ button = Dict.empty
|
||||
, textfield = Dict.empty
|
||||
, snackbar = Nothing
|
||||
, toggles = Dict.empty
|
||||
--, template = Dict.empty
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue