diff --git a/lib/heroicons.ex b/lib/heroicons.ex
index 0d6aa08..0c7f159 100644
--- a/lib/heroicons.ex
+++ b/lib/heroicons.ex
@@ -1,18 +1,25 @@
defmodule Heroicons do
@moduledoc """
- This library provides functions and components for every [Heroicon](https://github.com/tailwindlabs/heroicons).
+ This library provides Phoenix Components for every [Heroicon](https://github.com/tailwindlabs/heroicons).
+ See `Heroicons.Outline` and `Heroicons.Solid` for the two styles of icon.
- Heroicons are provided as functions in `Heroicons.Outline` and `Heroicons.Solid`,
- and as `Phoenix.Component`s in `Heroicons.Components.Outline` and `Heroicons.Components.Solid`.
+ ## Examples
+
- Note that components require your project to have `:phoenix_live_view` as a dependency.
+
+
+ Functions are also provided but deprecated
+
+ <%= Heroicons.Outline.adjustments() %>
+
+ <%= Heroicons.Solid.arrow_circle_right(class: "w-6 h-6") />
Heroicons are designed by [Steve Schoger](https://twitter.com/steveschoger)
"""
defmodule Outline do
@moduledoc """
- Outline style icons drawn with a stroke, packaged as functions.
+ Outline style icons drawn with a stroke, packaged as Phoenix Components.
For primary navigation and marketing sections, designed to be rendered at 24x24.
"""
@@ -22,7 +29,7 @@ defmodule Heroicons do
defmodule Solid do
@moduledoc """
- Solid style icons drawn with fills, packaged as functions.
+ Solid style icons drawn with fills, packaged as Phoenix Components.
For buttons, form elements, and to support text, designed to be rendered at 20x20.
"""
diff --git a/lib/heroicons/generator.ex b/lib/heroicons/generator.ex
index 0d82fbc..b73b537 100644
--- a/lib/heroicons/generator.ex
+++ b/lib/heroicons/generator.ex
@@ -24,16 +24,19 @@ defmodule Heroicons.Generator do
doc = """
)}) {: 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 =