defmodule PinchflatWeb.CustomComponents.TabComponents do @moduledoc false use Phoenix.Component @doc """ Takes a list of tabs and renders them in a tabbed layout. """ slot :tab, required: true do attr :id, :string, required: true attr :title, :string, required: true end slot :tab_append, required: false def tabbed_layout(assigns) do assigns = Map.put(assigns, :first_tab_id, hd(assigns.tab).id) ~H"""