Current section
Files
Jump to
Current section
Files
lib/moon_backoffice_web/components/controls.ex
defmodule MoonBackofficeWeb.Controls do
@moduledoc false
use Phoenix.Component
use MoonLive
import MoonBackofficeWeb.CoreComponents, only: [icon: 1]
attr :class, :string, default: ""
def logotype(assigns) do
~H"""
<.icon name="logo" class={@class} />
"""
end
attr :id, :string, required: true
attr :click, :string, default: nil
attr :icon, :string, default: ""
attr :class, :string, default: ""
def burger_button(assigns) do
~H"""
<.button
id={@id}
phx-click={@click}
icon
variant="outline"
class={@class}
>
<.icon name={@icon} class="" />
</.button>
"""
end
def burger_close_button(assigns) do
~H"""
<.button
id={@id}
phx-click={@click}
icon
class={@class}
>
<.icon name={@icon} class="absolute" />
</.button>
"""
end
end