Remove warnings for function version of the icons

This commit is contained in:
Max Veytsman
2022-02-15 23:44:39 -05:00
parent 4aa62f6ee1
commit 03bbf8b3c6
4 changed files with 4 additions and 9 deletions

View File

@ -32,7 +32,7 @@ and style it with some classes
<Heroicons.Solid.cake class="h-6 w-6 text-gray-500" />
```
Note that if you are not using HEEx/LiveView, there are (deprecated) function versions of each component:
There are also function versions of each component:
```eex
<%= Heroicons.Solid.cake() %>

View File

@ -8,7 +8,7 @@ defmodule Heroicons do
<Heroicons.Solid.arrow_circle_right class="w-6 h-6" />
Functions are also provided but deprecated
Can also be used as a function
<%= Heroicons.Outline.adjustments() %>

View File

@ -32,7 +32,7 @@ defmodule Heroicons.Generator do
<.#{name} class="h-6 w-6 text-gray-500" />
Can also be used as a function (deprecated)
or as a function
<%= #{name}() %>
@ -60,11 +60,6 @@ defmodule Heroicons.Generator do
end
def unquote(name)(opts) when is_list(opts) do
IO.warn(
"<%= #{unquote(name)}(class: \"...\" %> is deprecated, " <>
"please use <.#{unquote(name)} class=\"...\" /> inside HEEx templates instead"
)
attrs =
for {k, v} <- opts do
safe_k =

View File

@ -66,7 +66,7 @@ defmodule HeroiconsTest do
<.academic_cap class="h-6 w-6 text-gray-500" />
Can also be used as a function (deprecated)
or as a function
<%= academic_cap() %>