Unify genre tag styling in record edit form

Use Fluxon .badge component instead of custom spans to match
the read view styling.

Closes #115
This commit is contained in:
Claudio Ortolina
2026-03-16 14:34:35 +00:00
parent 4370391265
commit 244e7734a5
@@ -72,25 +72,17 @@ defmodule MusicLibraryWeb.Components.RecordForm do
value={genre} value={genre}
/> />
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<span <.badge
:for={genre <- get_current_genres(assigns)} :for={genre <- get_current_genres(assigns)}
class={[ variant="soft"
"inline-flex items-center gap-x-1", phx-click="remove_genre"
"rounded-md bg-zinc-100 dark:bg-zinc-700", phx-value-genre={genre}
"px-2 py-1 text-sm text-zinc-700 dark:text-zinc-300" phx-target={@myself}
]} class="cursor-pointer"
> >
{genre} {genre}
<button <.icon name="hero-x-mark" class="h-3.5 w-3.5" />
type="button" </.badge>
phx-click="remove_genre"
phx-value-genre={genre}
phx-target={@myself}
class="text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-200"
>
<.icon name="hero-x-mark" class="h-3.5 w-3.5" />
</button>
</span>
</div> </div>
<div class="relative" id="genre-input-container" phx-hook=".GenreInput" phx-target={@myself}> <div class="relative" id="genre-input-container" phx-hook=".GenreInput" phx-target={@myself}>
<.input <.input