module View.ActivatedClasses ( activatedClasses ) where import Html import Html.Attributes (..) 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)