Add some todos to 8
This commit is contained in:
@@ -26,12 +26,8 @@ type Action
|
|||||||
|
|
||||||
update : Action -> Model -> ( Model, Effects Action )
|
update : Action -> Model -> ( Model, Effects Action )
|
||||||
update action model =
|
update action model =
|
||||||
case action of
|
-- TODO make expand and collapse work
|
||||||
Expand ->
|
( model, Effects.none )
|
||||||
( { model | expanded = True }, Effects.none )
|
|
||||||
|
|
||||||
Collapse ->
|
|
||||||
( { model | expanded = False }, Effects.none )
|
|
||||||
|
|
||||||
|
|
||||||
view : Address Action -> Model -> Html
|
view : Address Action -> Model -> Html
|
||||||
@@ -47,11 +43,13 @@ view address model =
|
|||||||
]
|
]
|
||||||
[ text model.name ]
|
[ text model.name ]
|
||||||
, button
|
, button
|
||||||
[ class "hide-result", onClick address Collapse ]
|
-- TODO when the user clicks, send a Collapse action
|
||||||
|
[ class "hide-result" ]
|
||||||
[ text "X" ]
|
[ text "X" ]
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
[ button
|
[ button
|
||||||
[ class "expand-result", onClick address Expand ]
|
-- TODO when the user clicks, send an Expand action
|
||||||
|
[ class "expand-result" ]
|
||||||
[ text "Show" ]
|
[ text "Show" ]
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user