diff options
Diffstat (limited to 'src/View/View.elm')
-rw-r--r-- | src/View/View.elm | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/View/View.elm b/src/View/View.elm index ae60807..2f12902 100644 --- a/src/View/View.elm +++ b/src/View/View.elm @@ -24,7 +24,7 @@ view model = div [] [ h1 [] [ text "Timer" ] - , addTimer model.newTimerName + , addTimer , model.timers |> Dict.toList |> List.sortBy (.creationTime << snd) @@ -32,24 +32,15 @@ view model = |> timers ] -addTimer : String -> Html -addTimer name = - div - [ class "addTimer" ] - [ input - [ placeholder "Name" - , value name - , on "input" targetValue (Signal.send updates << RenameNewTimer) - , onEnter (Signal.send updates AddNewTimer) - , autofocus True - ] +addTimer : Html +addTimer = + button + [ class "addTimer" + , onClick (Signal.send updates AddNewTimer) + ] + [ i + [ class "fa fa-fw fa-plus" ] [] - , button - [ onClick (Signal.send updates AddNewTimer) ] - [ i - [ class "fa fa-fw fa-plus" ] - [] - ] ] onEnter : Signal.Message -> Attribute |