defmodule <%= @module_name %>Web.Components.Card do use Phoenix.Component @moduledoc """ Card component """ attr(:title, :string, doc: "Card title") attr(:subheading, :string, doc: "Card subheading") attr(:body, :string, doc: "Card body") attr(:image, :string, doc: "Card image", required: false) attr(:class, :string, default: "", doc: "CSS class for card") attr(:rest, :global) def card(assigns) do ~H"""
<%%= @title %>

<%%= @subheading %>

<%%= @body %>
""" end end