Improve docs

This commit is contained in:
Max Veytsman
2021-11-12 12:02:26 -05:00
parent e3b30e6259
commit 97b3e4ceca
2 changed files with 21 additions and 13 deletions

View File

@ -24,16 +24,19 @@ defmodule Heroicons.Generator do
doc = """
![](assets/#{Path.relative_to(path, :code.priv_dir(:heroicons))}) {: width=24px}
Use as a `Phoenix.Component`
<.#{name}>
## Examples
<.#{name} class="h-6 w-6 text-gray-500">
Use as a `Phoenix.Component`
<.#{name} />
<.#{name} class="h-6 w-6 text-gray-500" />
Can also be used as a function (deprecated)
<%= #{name}() %>
<%= #{name}() %>
<%= #{name}(class: "h-6 w-6 text-gray-500") %>
<%= #{name}(class: "h-6 w-6 text-gray-500") %>
"""
quote do
@ -62,8 +65,6 @@ defmodule Heroicons.Generator do
"please use <.#{unquote(name)} class=\"...\" /> inside HEEx templates instead"
)
# opts = Keyword.merge(unquote(default_attrs), opts)
attrs =
for {k, v} <- opts do
safe_k =