defmodule Shino.UI.Shell do @moduledoc """ Provides application shell related components. """ use Shino.UI, :component alias Shino.UI.Button alias Shino.UI.Sheet @doc """ Renders application shell using two column layout. It's better to have following class on `` for using this component: ```html <% # ... %> ``` ## Responsive design The breakpoint of responsive design is `md`. """ attr :id, :string, default: "shell" slot :logo, required: true slot :sidebar, required: true slot :topbar slot :main, required: true def two_column(assigns) do ~H"""
<.icon name="tabler-menu-2" class="h-5 w-5" />
<%= render_slot(@logo) %> <%= render_slot(@sidebar, %{id: "#{@id}-nav-sm-sidebar"}) %>
<%= if @topbar != [] do %> <%= render_slot(@topbar, %{id: "#{@id}-topbar"}) %> <% end %>
<%= render_slot(@main) %>
""" end end