Support both new and old LV helper

This commit is contained in:
Chris McCord
2022-08-30 10:19:09 -04:00
parent 2113251bc6
commit 08cafd8297

View File

@ -44,7 +44,7 @@ defmodule Heroicons.Generator do
def unquote(name)(assigns_or_opts \\ [])
if function_exported?(Phoenix.Component, :assigns_to_attributes, 1) do
if function_exported?(Phoenix.Component, :assigns_to_attributes, 2) do
@assigns_to_attrs_mod Phoenix.Component
else
@assigns_to_attrs_mod Phoenix.LiveView.Helpers