diff options
author | Joris Guyonvarch | 2015-03-16 20:37:44 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-16 20:37:44 +0100 |
commit | 4e5f27a5b1428b9ad190a87a6bf0d4fe187387c9 (patch) | |
tree | 726182399610921064223cd0dd2b868a9ca710f8 /src/View/Timer.elm | |
parent | cd3b37adebca99138fad1acca37908183036ace9 (diff) |
Adding a remove button to delete a timer
Diffstat (limited to 'src/View/Timer.elm')
-rw-r--r-- | src/View/Timer.elm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/View/Timer.elm b/src/View/Timer.elm index 668bf08..13f071c 100644 --- a/src/View/Timer.elm +++ b/src/View/Timer.elm @@ -18,15 +18,20 @@ import Update.UpdateTimer (..) timerView : (Id, Timer) -> Html timerView (id, timer) = div - [ class "timer" ] - [ div - [ class "block" ] - [ text timer.name ] - , div - [ class <| "timerTime block" ++ (if timer.isRunning then " isRunning" else "") + [ class <| "timer" ++ (if timer.isRunning then " isRunning" else "") ] + [ button + [ class "name block" , onClick (Signal.send updates (UpdateTimer id ToggleRunning)) ] + [ text timer.name ] + , div + [ class <| "time block" ] [ text (timeView timer.time) ] + , button + [ class <| "remove block" + , onClick (Signal.send updates (RemoveTimer id)) + ] + [ i [ class "fa fa-fw fa-remove" ] [] ] ] timeView : Time -> String |