defmodule Corex.Layout.Heading do @moduledoc ~S''' A layout heading component for page titles, subtitles, and actions. ## Examples ### Basic Use the `:title` and `:subtitle` slots for the main heading content. Use the `:actions` slot for buttons or links on the right. ```heex <.layout_heading> <:title>Page Title <:subtitle>Optional subtitle or context <:actions> <.action phx-click="save">Save ``` ### Title and subtitle only Omit the `:actions` slot when no action buttons are needed. ```heex <.layout_heading> <:title>Settings <:subtitle>Manage your preferences ``` ## Styling Target elements with data attributes: - `[data-scope="layout-heading"][data-part="root"]` – root container - `[data-scope="layout-heading"][data-part="content"]` – title/subtitle wrapper - `[data-scope="layout-heading"][data-part="title"]` – main title - `[data-scope="layout-heading"][data-part="subtitle"]` – subtitle - `[data-scope="layout-heading"][data-part="actions"]` – actions wrapper ''' use Phoenix.Component attr(:rest, :global) slot(:title) slot(:subtitle) slot(:actions) def layout_heading(assigns) do ~H"""