Load dominant colors from record

This commit is contained in:
Claudio Ortolina
2025-06-07 20:41:39 +01:00
parent 378992e632
commit be8b7ead5f
5 changed files with 5 additions and 9 deletions
@@ -396,13 +396,13 @@ defmodule MusicLibraryWeb.RecordComponents do
end
end
attr :colors, :list, required: true
attr :record, Records.Record, required: true
def record_colors(assigns) do
~H"""
<span class="flex items-center">
<span
:for={color <- @colors}
:for={color <- @record.dominant_colors}
class="inline-block w-4 h-4 mr-1"
style={"background-color: #{color}"}
>