From 0075abf51db5d1b54117525d7a7f9b06e31c9484 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Tue, 17 Mar 2015 21:26:40 +0100 Subject: Adding an edition mode for a timer --- src/View/ActivatedClasses.elm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/View/ActivatedClasses.elm (limited to 'src/View/ActivatedClasses.elm') diff --git a/src/View/ActivatedClasses.elm b/src/View/ActivatedClasses.elm new file mode 100644 index 0000000..9594448 --- /dev/null +++ b/src/View/ActivatedClasses.elm @@ -0,0 +1,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) -- cgit v1.2.3