defmodule DaisyUIComponents.Drawer do
@moduledoc """
Drawer component
https://daisyui.com/components/drawer
"""
use DaisyUIComponents.Component
import DaisyUIComponents.Icon
import DaisyUIComponents.Input
attr :id, :string, required: true
attr :class, :any, default: nil
slot :page_content
slot :inner_block, required: true
def drawer(assigns) do
~H"""
<.input id={@id} type="checkbox" class="drawer-toggle" />
<%= render_slot(@page_content) %>
<%= render_slot(@inner_block) %>
"""
end
attr :drawer_id, :string, required: true
attr :class, :any, default: nil
slot :inner_block, required: true
def drawer_side(assigns) do
~H"""
<%= render_slot(@inner_block) %>
"""
end
end