-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic icons #21
Comments
@mplatts, I got this to work: 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
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an easy way to pass in the icon name as an argument?
eg:
The text was updated successfully, but these errors were encountered: