blob: 9594448692cb298a0518469636c141f44f88eb33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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)
|