So I think the issue is this line if I understand your post correctly:
That doesn’t work, right? And the idea is that you want dynamically rendered icons.
Someone else was able to figure this out in another icon library.
Check out this this issue.
use Phoenix.Component
attr :rest, :global,
doc: "the arbitrary HTML attributes for the svg container",
include: ~w(fill stroke stroke-width)
attr :name, :atom, required: true
attr :outline, :boolean, default: true
attr :solid, :boolean, default: false
attr :mini, :boolean, default: false
def icon(assigns) do
apply(Heroicons, assigns.name, [assigns])
end
<.icon name={:academic_cap} class="h-4 w-4" />