defmodule CanneryWeb.Components.TagCard do @moduledoc """ Display card for a tag """ use CanneryWeb, :component alias CanneryWeb.Endpoint def tag_card(assigns) do ~H"""

<%= @tag.name %>

<%= live_patch to: Routes.tag_index_path(Endpoint, :edit, @tag), class: "text-primary-500 link" do %> <% end %> <%= link to: "#", class: "text-primary-500 link", phx_click: "delete", phx_value_id: @tag.id, data: [ confirm: dgettext("prompts", "Are you sure you want to delete %{name}?", name: @tag.name) ] do %> <% end %>
""" end end