Apply tag colors from settings

This commit is contained in:
Eike Kettner
2020-06-08 00:54:47 +02:00
parent 1cd65b7b7c
commit 1dd84c11bd
39 changed files with 375 additions and 341 deletions

View File

@ -2,7 +2,7 @@ module Util.Tag exposing (makeDropdownModel)
import Api.Model.Tag exposing (Tag)
import Comp.Dropdown
import Util.Maybe
import Data.UiSettings
makeDropdownModel : Comp.Dropdown.Model Tag
@ -13,10 +13,7 @@ makeDropdownModel =
, makeOption = \tag -> { value = tag.id, text = tag.name }
, labelColor =
\tag ->
if Util.Maybe.nonEmpty tag.category then
"basic blue"
else
""
\settings ->
"basic " ++ Data.UiSettings.tagColorString tag settings
, placeholder = "Choose a tag"
}