Skip to content

Commit

Permalink
add wrapper around icon svg
Browse files Browse the repository at this point in the history
  • Loading branch information
woylie committed Dec 5, 2023
1 parent 0cc9324 commit 84dd339
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/doggo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ defmodule Doggo do
aria-label={if @label && @label_placement == :hidden, do: @label}
{@rest}
>
<%= render_slot(@inner_block) %>
<span class="icon-svg"><%= render_slot(@inner_block) %></span>
<span :if={@label && @label_placement != :hidden}><%= @label %></span>
</span>
"""
Expand Down Expand Up @@ -582,7 +582,9 @@ defmodule Doggo do
aria-label={if @label && @label_placement == :hidden, do: @label}
{@rest}
>
<svg aria-hidden="true"><use href={"#{@sprite_url}##{@name}"} /></svg>
<span class="icon-svg">
<svg aria-hidden="true"><use href={"#{@sprite_url}##{@name}"} /></svg>
</span>
<span :if={@label && @label_placement != :hidden}><%= @label %></span>
</span>
"""
Expand Down

0 comments on commit 84dd339

Please sign in to comment.