„lib/chiya_web/components/public_components.ex“ ändern

This commit is contained in:
inhji 2023-07-07 13:02:31 +02:00
parent 4ca131a749
commit 87d98c9869

View file

@ -65,6 +65,20 @@ defmodule ChiyaWeb.PublicComponents do
""" """
end end
attr :note, :map, required: true
def tags(assigns) do
~H"""
<span class="inline-flex flex-row gap-1">
<%= for tag <- @note.tags do %>
<a href={~p"/tagged-with/#{tag.slug}"} class="underline-link font-semibold | p-category">
<%= tag.name %>
</a>
<% end %>
</span>
"""
end
@doc """ @doc """
Renders a note-header with title. Renders a note-header with title.
""" """