defmodule <%= @module_name %>.Components.UI.Card do @moduledoc """ Composable Card component with 6 independent sub-components. Ejected from PhiaUI — owns this copy of the source. Customise freely. ## Sub-components | Function | Element | Purpose | |---------------------|---------|--------------------------------| | `card/1` | `
` | Outer container with surface | | `card_header/1` | `
` | Header layout (title + desc) | | `card_title/1` | `

` | Card heading | | `card_description/1`| `

` | Subtitle / supporting text | | `card_content/1` | `

` | Primary content area | | `card_footer/1` | `
` | Footer row (actions, meta) | ## Example <.card> <.card_header> <.card_title>Account Balance <.card_description>Your current balance <.card_content>

$12,340.00

<.card_footer> Last updated: today """ use Phoenix.Component import <%= @module_name %>.ClassMerger, only: [cn: 1] attr :class, :string, default: nil, doc: "Additional CSS classes" attr :rest, :global, doc: "HTML attributes forwarded to the div element" slot :inner_block, required: true, doc: "Card content" def card(assigns) do ~H"""
<%%= render_slot(@inner_block) %>
""" end attr :class, :string, default: nil, doc: "Additional CSS classes" attr :rest, :global, doc: "HTML attributes forwarded to the div element" slot :inner_block, required: true, doc: "Header content" def card_header(assigns) do ~H"""
<%%= render_slot(@inner_block) %>
""" end attr :class, :string, default: nil, doc: "Additional CSS classes" attr :rest, :global, doc: "HTML attributes forwarded to the h3 element" slot :inner_block, required: true, doc: "Title text" def card_title(assigns) do ~H"""

<%%= render_slot(@inner_block) %>

""" end attr :class, :string, default: nil, doc: "Additional CSS classes" attr :rest, :global, doc: "HTML attributes forwarded to the p element" slot :inner_block, required: true, doc: "Description text" def card_description(assigns) do ~H"""

<%%= render_slot(@inner_block) %>

""" end attr :class, :string, default: nil, doc: "Additional CSS classes" attr :rest, :global, doc: "HTML attributes forwarded to the div element" slot :inner_block, required: true, doc: "Primary content" def card_content(assigns) do ~H"""
<%%= render_slot(@inner_block) %>
""" end attr :class, :string, default: nil, doc: "Additional CSS classes" attr :rest, :global, doc: "HTML attributes forwarded to the div element" slot :inner_block, required: true, doc: "Footer content" def card_footer(assigns) do ~H"""
<%%= render_slot(@inner_block) %>
""" end end