Packages

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

Current section

Files

Jump to
surface_boxicon lib icons solid_box.ex
Raw

lib/icons/solid_box.ex

defmodule Boxicon.SolidBox 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="M2 3h20v4H2zm17 5H3v11a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8h-2zm-3 6H8v-2h8v2z"/></svg>
"""
end
end