Packages

Boxicon is surface component library that wraps the amazing boxicons library.

Current section

Files

Jump to
boxicon lib icons regular_tag.ex
Raw

lib/icons/regular_tag.ex

defmodule Boxicon.RegularTag do
use Surface.Component
@doc "Width & height of the icon"
prop size, :integer, default: 24
@doc "CSS classes for the wrapping svg element"
prop class, :string, default: ""
@impl true
def render(assigns) do
~F"""
<svg xmlns="http://www.w3.org/2000/svg" width={"#{@size}"} height={"#{@size}"} class={"#{@class}"} viewBox="0 0 24 24"><path d="M20 4H8.515a2 2 0 0 0-1.627.838l-4.701 6.581a.997.997 0 0 0 0 1.162l4.701 6.581A2 2 0 0 0 8.515 20H20c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm0 14H8.515l-4.286-6 4.286-6H20v12z"/></svg>
"""
end
end