Fix class order in tests/docs
This commit is contained in:
@ -42,7 +42,7 @@ There are also function versions of each component:
|
|||||||
```eex
|
```eex
|
||||||
<%= Heroicons.Solid.cake() %>
|
<%= 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/).
|
For a full list of icons see [the docs](https://hexdocs.pm/heroicons/api-reference.html) or [heroicons.com](https://heroicons.com/).
|
||||||
|
@ -54,7 +54,7 @@ defmodule Heroicons.Generator do
|
|||||||
or as a function
|
or as a function
|
||||||
|
|
||||||
<%= #{name}() %>
|
<%= #{name}() %>
|
||||||
<%= #{name}(class: "h-6 w-6 text-gray-500") %>
|
<%= #{name}(class: "w-6 h-6 text-gray-500") %>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ defmodule HeroiconsTest do
|
|||||||
assert result =~ ~s(stroke-width="1.5")
|
assert result =~ ~s(stroke-width="1.5")
|
||||||
assert result =~ ~s(viewBox="0 0 24 24")
|
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() =~
|
|> 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: "<> \" ")
|
assert Heroicons.Outline.academic_cap(class: "<> \" ")
|
||||||
|> Phoenix.HTML.safe_to_string() =~
|
|> Phoenix.HTML.safe_to_string() =~
|
||||||
@ -50,9 +50,9 @@ defmodule HeroiconsTest do
|
|||||||
|
|
||||||
assert render_component(
|
assert render_component(
|
||||||
&Heroicons.Outline.academic_cap/1,
|
&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())
|
mini = render_component(&Heroicons.Mini.academic_cap/1, assigns())
|
||||||
assert solid =~ ~s(<svg )
|
assert solid =~ ~s(<svg )
|
||||||
@ -79,12 +79,12 @@ defmodule HeroiconsTest do
|
|||||||
Use as a `Phoenix.Component`
|
Use as a `Phoenix.Component`
|
||||||
|
|
||||||
<.academic_cap />
|
<.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
|
or as a function
|
||||||
|
|
||||||
<%= academic_cap() %>
|
<%= academic_cap() %>
|
||||||
<%= academic_cap(class: "h-6 w-6 text-gray-500") %>
|
<%= academic_cap(class: "w-6 h-6 text-gray-500") %>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user