Show dominant colors in wishlisted record details page

This commit is contained in:
Claudio Ortolina
2025-06-07 19:41:11 +01:00
parent ccb3089ddf
commit 7efbbe0683
5 changed files with 25 additions and 10 deletions
@@ -395,4 +395,19 @@ defmodule MusicLibraryWeb.RecordComponents do
country_code
end
end
attr :colors, :list, required: true
def record_colors(assigns) do
~H"""
<span class="flex items-center">
<span
:for={color <- @colors}
class="inline-block w-4 h-4 mr-1"
style={"background-color: #{color}"}
>
</span>
</span>
"""
end
end