defmodule PhoenixDuskmoon.Component.Actionbar do @moduledoc """ Render actionbar. """ use PhoenixDuskmoon.Component, :html @doc """ Generates a actionbar. ## Examples ```heex <.dm_actionbar class="shadow"> <:left> Star Wars <:right> <:right> ``` """ @doc type: :component attr(:id, :any, default: false, doc: """ html attribute id """ ) attr(:class, :any, default: "", doc: """ html attribute class """ ) attr(:left_class, :any, default: "", doc: """ left part html attribute class """ ) attr(:right_class, :any, default: "", doc: """ right part html attribute class """ ) slot(:left, required: false, doc: """ Left part of action bar. """ ) do attr(:id, :any) attr(:class, :any) end slot(:right, required: false, doc: """ Right part of action bar. """ ) do attr(:id, :any) attr(:class, :any) end def dm_actionbar(assigns) do ~H"""
<%= render_slot(left) %>
<%= render_slot(right) %>
""" end end