Created
February 25, 2017 08:45
-
-
Save TheZoq2/cd6ec6408d81816767a8f4bcaa7a183d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tagListListHtml : | |
| TagListList | |
| -> (Int -> msg) | |
| -> (Int -> msg) | |
| -> (Int -> Int -> msg) | |
| -> (Int -> Int -> msg) | |
| -> Html msg | |
| tagListListHtml | |
| tagListList | |
| onRemoveButton | |
| onDisableButton | |
| onTagRemoveButton | |
| onTagTextClick | |
| = | |
| let | |
| foldFunction = | |
| (\id value acc -> | |
| acc ++ [(value, (onTagTextClick id), (onTagRemoveButton id))]) | |
| tagLists = | |
| Dict.foldl foldFunction [] tagListList.tagLists | |
| in | |
| ul [] | |
| <| List.map (\tag onText onRemove -> tagListHtml tag onText onRemove) tagLists | |
| tagListHtml : TagList -> (Int -> msg) -> (Int -> msg) -> Html msg | |
| tagListHtml list onTextClick onRemoveButton = | |
| Dict.foldl | |
| (\key value acc -> acc ++ [(value, (onTextClick key), (onRemoveButton key))]) | |
| [] | |
| list.tags | |
| |> htmlFromListOfTags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment