From 8060fc370a8e16c7f39b1f63c6dc9127073eb5fe Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Mon, 16 Mar 2015 21:59:06 +0100 Subject: Updating design --- src/View/View.elm | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'src/View/View.elm') 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 -- cgit v1.2.3