mirror of
https://github.com/correl/elm-mdl.git
synced 2024-11-23 11:09:51 +00:00
Re-named State -> Container
This commit is contained in:
parent
4e9b8e6746
commit
e5b71fde06
2 changed files with 18 additions and 20 deletions
|
@ -2,7 +2,7 @@ module Material.Button
|
|||
( Model, model, Action(Click), update
|
||||
, flat, raised, fab, minifab, icon
|
||||
, colored, primary, accent
|
||||
, View, State, Instance, instance, fwdClick
|
||||
, View, Container, Observer, Instance, instance, fwdClick
|
||||
) where
|
||||
|
||||
{-| From the [Material Design Lite documentation](http://www.getmdl.io/components/#buttons-section):
|
||||
|
@ -40,7 +40,7 @@ for details about what type of buttons are appropriate for which situations.
|
|||
@docs flat, raised, fab, minifab, icon
|
||||
|
||||
# Component
|
||||
@docs State, Instance, instance, fwdClick
|
||||
@docs Container, Observer, Instance, instance, fwdClick
|
||||
|
||||
-}
|
||||
|
||||
|
@ -261,34 +261,32 @@ icon = view "mdl-button--icon"
|
|||
|
||||
{-|
|
||||
-}
|
||||
type alias State s =
|
||||
{ s | button : Indexed Model }
|
||||
type alias Container c =
|
||||
{ c | button : Indexed Model }
|
||||
|
||||
|
||||
{-|
|
||||
-}
|
||||
type alias Observer obs =
|
||||
Component.Observer Action obs
|
||||
|
||||
|
||||
{-|
|
||||
-}
|
||||
type alias Instance state obs =
|
||||
type alias Instance container obs =
|
||||
Component.Instance
|
||||
Model
|
||||
state
|
||||
Action
|
||||
obs
|
||||
(List Style -> List Html -> Html)
|
||||
Model container Action obs (List Style -> List Html -> Html)
|
||||
|
||||
|
||||
{-| Component instance.
|
||||
-}
|
||||
instance :
|
||||
Int
|
||||
-> (Component.Action (State state) obs -> obs)
|
||||
-> (Component.Action (Container c) obs -> obs)
|
||||
-> (Address Action -> Model -> List Style -> List Html -> Html)
|
||||
-> Model
|
||||
-> List (Observer obs)
|
||||
-> Instance (State state) obs
|
||||
-> Instance (Container c) obs
|
||||
|
||||
instance id lift view model0 observers =
|
||||
Component.instance
|
||||
|
|
|
@ -30,7 +30,7 @@ This implementation provides only single-line.
|
|||
@docs Action, Model, model, update, view
|
||||
|
||||
# Component
|
||||
@docs State, Instance
|
||||
@docs Container, Instance
|
||||
@docs instance, fwdInput, fwdBlur, fwdFocus
|
||||
|
||||
-}
|
||||
|
@ -76,7 +76,7 @@ type Kind
|
|||
-}
|
||||
|
||||
|
||||
{-| Model. The textfield is in its error-state if `error` is not `Nothing`.
|
||||
{-| Model. The textfield is in its error-container if `error` is not `Nothing`.
|
||||
The contents of the field is `value`.
|
||||
-}
|
||||
type alias Model =
|
||||
|
@ -179,24 +179,24 @@ view addr model =
|
|||
|
||||
{-|
|
||||
-}
|
||||
type alias State state =
|
||||
{ state | textfield : Indexed Model }
|
||||
type alias Container c =
|
||||
{ c | textfield : Indexed Model }
|
||||
|
||||
|
||||
{-|
|
||||
-}
|
||||
type alias Instance state obs =
|
||||
Component.Instance Model state Action obs Html
|
||||
type alias Instance container obs =
|
||||
Component.Instance Model container Action obs Html
|
||||
|
||||
|
||||
{-| Component constructor. See module `Material`.
|
||||
-}
|
||||
instance :
|
||||
Int
|
||||
-> (Component.Action (State state) obs -> obs)
|
||||
-> (Component.Action (Container c) obs -> obs)
|
||||
-> Model
|
||||
-> List (Component.Observer Action obs)
|
||||
-> Instance (State state) obs
|
||||
-> Instance (Container c) obs
|
||||
|
||||
instance =
|
||||
let
|
||||
|
|
Loading…
Reference in a new issue