Create Tailwind module

Moving the UI.tw function into Tailwind.use. Creating and consuming some
functions like Tailwind.if_ and Tailwind.when to make it easier to conditionally
style some of my components.
This commit is contained in:
William Carroll 2020-04-19 13:40:18 +01:00
parent 7b2163d804
commit f92fe97aff
5 changed files with 49 additions and 27 deletions

View file

@ -6,6 +6,7 @@ import Html.Events exposing (..)
import Icon
import Responsive
import State
import Tailwind
import Tempo
import Theory
import UI
@ -105,7 +106,7 @@ keyCheckboxes model =
, "pt-10"
, Responsive.h2
]
|> UI.tw
|> Tailwind.use
|> class
]
[ text "Select keys" ]
@ -134,7 +135,7 @@ closePreferences =
, "top-0"
, "z-10"
]
|> UI.tw
|> Tailwind.use
|> class
, onClick (State.SetView State.Practice)
]