Packages

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

Current section

Files

Jump to
surface_boxicon lib icons regular_package.ex
Raw

lib/icons/regular_package.ex

defmodule Boxicon.RegularPackage 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" viewBox="0 0 24 24" width={"#{@size}"} height={"#{@size}"} class={"#{@class}"}><path d="M22 8a.76.76 0 0 0 0-.21v-.08a.77.77 0 0 0-.07-.16.35.35 0 0 0-.05-.08l-.1-.13-.08-.06-.12-.09-9-5a1 1 0 0 0-1 0l-9 5-.09.07-.11.08a.41.41 0 0 0-.07.11.39.39 0 0 0-.08.1.59.59 0 0 0-.06.14.3.3 0 0 0 0 .1A.76.76 0 0 0 2 8v8a1 1 0 0 0 .52.87l9 5a.75.75 0 0 0 .13.06h.1a1.06 1.06 0 0 0 .5 0h.1l.14-.06 9-5A1 1 0 0 0 22 16V8zm-10 3.87L5.06 8l2.76-1.52 6.83 3.9zm0-7.72L18.94 8 16.7 9.25 9.87 5.34zM4 9.7l7 3.92v5.68l-7-3.89zm9 9.6v-5.68l3-1.68V15l2-1v-3.18l2-1.11v5.7z"/></svg>
"""
end
end