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 The e2e demo includes static **Anatomy** and **Style** pages (`/layout-heading/anatomy`, `/layout-heading/style`) built from `E2eWeb.Demos.LayoutHeadingDemo`, showing the `layout-heading` wrapper class with optional width utilities. 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) slot(:inner_pre) slot(:inner_post) def layout_heading(assigns) do ~H"""