Fix class order in tests/docs

This commit is contained in:
Max Veytsman
2022-09-02 19:03:41 -04:00
parent 2d954961af
commit 0091433f59
3 changed files with 8 additions and 8 deletions

View File

@ -42,7 +42,7 @@ There are also function versions of each component:
```eex
<%= Heroicons.Solid.cake() %>
<%= Heroicons.Solid.cake(class: "h-6 w-6 text-gray-500") %>
<%= Heroicons.Solid.cake(class: "w-6 h-6 text-gray-500") %>
```
For a full list of icons see [the docs](https://hexdocs.pm/heroicons/api-reference.html) or [heroicons.com](https://heroicons.com/).

View File

@ -54,7 +54,7 @@ defmodule Heroicons.Generator do
or as a function
<%= #{name}() %>
<%= #{name}(class: "h-6 w-6 text-gray-500") %>
<%= #{name}(class: "w-6 h-6 text-gray-500") %>
"""
end

View File

@ -12,9 +12,9 @@ defmodule HeroiconsTest do
assert result =~ ~s(stroke-width="1.5")
assert result =~ ~s(viewBox="0 0 24 24")
assert Heroicons.Outline.academic_cap(class: "h-6 w-6 text-gray-500")
assert Heroicons.Outline.academic_cap(class: "w-6 h-6 text-gray-500")
|> Phoenix.HTML.safe_to_string() =~
~s(class="h-6 w-6 text-gray-500")
~s(class="w-6 h-6 text-gray-500")
assert Heroicons.Outline.academic_cap(class: "<> \" ")
|> Phoenix.HTML.safe_to_string() =~
@ -50,9 +50,9 @@ defmodule HeroiconsTest do
assert render_component(
&Heroicons.Outline.academic_cap/1,
assigns(class: "h-6 w-6 text-gray-500")
assigns(class: "w-6 h-6 text-gray-500")
) =~
~s(class="h-6 w-6 text-gray-500")
~s(class="w-6 h-6 text-gray-500")
mini = render_component(&Heroicons.Mini.academic_cap/1, assigns())
assert solid =~ ~s(<svg )
@ -79,12 +79,12 @@ defmodule HeroiconsTest do
Use as a `Phoenix.Component`
<.academic_cap />
<.academic_cap class="h-6 w-6 text-gray-500" />
<.academic_cap class="w-6 h-6 text-gray-500" />
or as a function
<%= academic_cap() %>
<%= academic_cap(class: "h-6 w-6 text-gray-500") %>
<%= academic_cap(class: "w-6 h-6 text-gray-500") %>
"""
end