diff options
author | William Carroll <wpcarro@gmail.com> | 2020-07-31T17·32+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-07-31T17·57+0100 |
commit | 421c71c8922731563771ed75be7f28c9a559c068 (patch) | |
tree | f7723ade399bb02a638fa3df9371cdb072262eb5 /client/src/Tailwind.elm | |
parent | 29a00dc571b53b08064915c34e0d951467b6f1e4 (diff) |
Support a basic client-side login flow
I will need to remove some of the baggage like: - Scrub any copy about restaurants - delete Restaurant.elm - Change Owner.elm -> Manager.elm
Diffstat (limited to 'client/src/Tailwind.elm')
-rw-r--r-- | client/src/Tailwind.elm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/client/src/Tailwind.elm b/client/src/Tailwind.elm new file mode 100644 index 000000000000..57d419db5a82 --- /dev/null +++ b/client/src/Tailwind.elm @@ -0,0 +1,29 @@ +module Tailwind exposing (..) + +{-| Functions to make Tailwind development in Elm even more pleasant. +-} + + +{-| Conditionally use `class` selection when `condition` is true. +-} +when : Bool -> String -> String +when condition class = + if condition then + class + + else + "" + + +if_ : Bool -> String -> String -> String +if_ condition whenTrue whenFalse = + if condition then + whenTrue + + else + whenFalse + + +use : List String -> String +use styles = + String.join " " styles |