about summary refs log blame commit diff
path: root/users/wpcarro/website/sandbox/learnpianochords/src/Tailwind.elm
blob: 57d419db5a82e136974d69d0cb2affa84b15aeac (plain) (tree)




























                                                                     
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