module View.ActivatedClasses ( activatedClasses ) where import Html import Html.Attributes exposing (..) import List import String activatedClasses : List (Bool, String) -> Html.Attribute activatedClasses = class << String.concat << List.intersperse " " << List.filterMap (\(activated, str) -> if activated then Just str else Nothing)