about summary refs log tree commit diff
path: root/website/sandbox/chord-drill-sergeant/src/Tempo.elm
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-04-13T21·39+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-04-13T21·43+0100
commit1d427c49218db82735126cb7cf0da20162fa7e4e (patch)
treee703781a6d66215f8ebe510e9a676696fa6bfe16 /website/sandbox/chord-drill-sergeant/src/Tempo.elm
parenta64601cc058950d094a1daa512c94d91d11756cf (diff)
Begin styling efforts
Start styling the Chord Drill Sergeant for mobile devices because that is that
device on which I will primarily use CDS.

I'm also deleting the debugger related code. I would like to support a debugger,
but I'm not currently using this one, so I am going to remove it to keep things
slender.

- Introduce TailwindCSS, which also introduced elm-live, index.html, index.css
- Add mobile-first styling for the preferences modal
- Remove unused code
Diffstat (limited to 'website/sandbox/chord-drill-sergeant/src/Tempo.elm')
-rw-r--r--website/sandbox/chord-drill-sergeant/src/Tempo.elm21
1 files changed, 9 insertions, 12 deletions
diff --git a/website/sandbox/chord-drill-sergeant/src/Tempo.elm b/website/sandbox/chord-drill-sergeant/src/Tempo.elm
index 270cc5bd6dc6..50485c4c0aba 100644
--- a/website/sandbox/chord-drill-sergeant/src/Tempo.elm
+++ b/website/sandbox/chord-drill-sergeant/src/Tempo.elm
@@ -3,25 +3,22 @@ module Tempo exposing (render)
 import Html exposing (..)
 import Html.Attributes exposing (..)
 import Html.Events exposing (..)
+import UI
 
 
 type alias Props msg =
     { tempo : Int
-    , handleIncrease : msg
-    , handleDecrease : msg
     , handleInput : String -> msg
     }
 
 
 render : Props msg -> Html msg
-render { tempo, handleIncrease, handleDecrease, handleInput } =
-    div []
-        [ p [] [ text (String.fromInt tempo ++ " BPM") ]
-        , button [ onClick handleDecrease ] [ text "Slower" ]
-        , input
-            [ onInput handleInput
-            , placeholder "Set tempo..."
-            ]
-            []
-        , button [ onClick handleIncrease ] [ text "Faster" ]
+render { tempo, handleInput } =
+    div [ class "text-center" ]
+        [ p [ class "text-5xl py-10" ] [ text (String.fromInt tempo ++ " BPM") ]
+        , UI.textField
+            { placeholderText = "Set tempo..."
+            , handleInput = handleInput
+            , classes = []
+            }
         ]