Hi, what is the syntax to use the Phoenix inbuilt Heroicons in table_opts
in Flop Phoenix? Thanks
I’ve got this
def table_opts do
[
table_attrs: [class: "min-w-full divide-y divide-gray-200 dark:divide-neutral-700"],
symbol_unsorted: Phoenix.HTML.raw(~s{<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" />
</svg>
}),
symbol_desc: Phoenix.HTML.raw(~s{<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-3">
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" />
</svg>
}),
symbol_asc: Phoenix.HTML.raw(~s{<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-3">
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 15.75 7.5-7.5 7.5 7.5" />
</svg>
}),
]
I’d like to use Heroicons for symbol_up
. I tried some variations of below, but no luck
symbol_asc: Phoenix.HTML.raw(~H{<p><Heroicons.chevron_up></p>})
or
symbol_asc: Phoenix.HTML.raw(~s{<Heroicons.chevron_up>})