# Add the "Partner Spotlight" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/partner-spotlight) to this Pantheon Content Publisher (P1) Next.js project. One featured partner with a wordmark, story, sourced outcome stats and a quote card over a photo.

## Steps

1. Create `components/puck/partner-spotlight-block.tsx` with the exact file contents below. If `components/puck/` doesn't exist, find the folder where this project keeps its Puck components (look at the imports in `puck.config.tsx`) and put it there.
2. In `puck.config.tsx`, import it: `import { partnerSpotlightBlock } from "./components/puck/partner-spotlight-block";`
3. Register it under `components` as `PartnerSpotlightBlock: partnerSpotlightBlock`.
4. Add `"PartnerSpotlightBlock"` to the best-fitting entry in `categories` (this block's library category is "Social proof"). Create a category only if none fits.
5. Run the project's type check (usually `pnpm typecheck`) and resolve anything project-specific.
6. If `package.json` has a `sync:registry` script, tell the user it must run (or that CI will run it) before the new component appears in the P1 editor.

## Rules

- Do not add dependencies. The block is self-contained by design: one type-only import from `@puckeditor/core`, Tailwind v4 classes, no client JavaScript.
- Keep the files as-is unless the user asks for changes. The accent color is `indigo-*`; if the project has brand colors, offer to swap them with a find-and-replace on `indigo-`.
- Images are plain `imageUrl` + `imageAlt` text fields. If this project defines a P1 media-library field (search for `"p1-media"`), offer to switch to it.
- Don't change prop names in `defaultProps`. Content editors' saved pages depend on them.

## File: `components/puck/partner-spotlight-block.tsx`

```tsx
import type { ComponentConfig } from "@puckeditor/core";

/**
 * Partner Spotlight — one featured partner: wordmark or logo, the story of the work together,
 * a few outcome stats with a source line, and a quote from someone on their side.
 * Register: `PartnerSpotlightBlock: partnerSpotlightBlock` in puck.config.tsx.
 */

type Heading = "h1" | "h2" | "h3" | "h4";

export type PartnerSpotlightProps = {
  eyebrow: string;
  partnerName: string;
  logoUrl: string;
  heading: string;
  headingLevel: Heading;
  story: string;
  stats: { value: string; label: string }[];
  statsSource: string;
  quote: string;
  quoteName: string;
  quoteRole: string;
  imageUrl: string;
  imageAlt: string;
  ctaLabel: string;
  ctaHref: string;
};

export const partnerSpotlightBlock: ComponentConfig<PartnerSpotlightProps> = {
  label: "Partner Spotlight",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Small label such as \"Partner spotlight\". Leave blank to hide it." } },
    partnerName: { type: "text", label: "Partner name", metadata: { help: "Shown as a typeset wordmark when there's no logo, and used as the logo's alt text." } },
    logoUrl: { type: "text", label: "Logo URL", metadata: { help: "Optional wide logo (SVG or transparent PNG). Leave blank to show the name as a wordmark." } },
    heading: { type: "text", label: "Heading" },
    headingLevel: {
      type: "select",
      label: "Heading level",
      options: [
        { label: "H1", value: "h1" },
        { label: "H2", value: "h2" },
        { label: "H3", value: "h3" },
        { label: "H4", value: "h4" },
      ],
      metadata: { help: "Sets the page outline for screen readers and search. The look doesn't change." },
    },
    story: { type: "textarea", label: "Story", metadata: { help: "Two short paragraphs is plenty. Blank lines start a new paragraph." } },
    stats: {
      type: "array",
      label: "Outcomes",
      min: 0,
      max: 4,
      getItemSummary: (item) => [item?.value, item?.label].filter(Boolean).join(" · ").slice(0, 48) || "Outcome",
      defaultItemProps: { value: "100", label: "What this number counts" },
      arrayFields: {
        value: { type: "text", label: "Number", metadata: { help: "Keep it short: 1,200 or 94% or $40K." } },
        label: { type: "text", label: "Label" },
      },
    },
    statsSource: { type: "text", label: "Outcomes source", metadata: { help: "Where the numbers come from and when. Shown under them." } },
    quote: { type: "textarea", label: "Quote", metadata: { help: "From someone at the partner organization. Leave blank to hide the quote card." } },
    quoteName: { type: "text", label: "Quote name" },
    quoteRole: { type: "text", label: "Quote role", metadata: { help: "Their title and organization." } },
    imageUrl: { type: "text", label: "Image URL", metadata: { help: "A portrait-orientation photo of the work. Leave blank for a text-only layout." } },
    imageAlt: { type: "text", label: "Image alt text", metadata: { help: "Describe what's happening in the photo." } },
    ctaLabel: { type: "text", label: "Button text" },
    ctaHref: { type: "text", label: "Button link" },
  },
  defaultProps: {
    eyebrow: "Partner spotlight",
    partnerName: "Eastbank Health Collective",
    logoUrl: "",
    heading: "Bringing the clinic to the community garden",
    headingLevel: "h2",
    story:
      "Eastbank Health Collective had nurses and screening kits, but the families they most wanted to reach rarely came to the clinic. We had a garden full of those families every Saturday morning.\n\nSo we put a folding table between the tomato beds. Two seasons later, the Saturday health table is the busiest hour of the week for both of us.",
    stats: [
      { value: "640", label: "Free blood-pressure screenings" },
      { value: "212", label: "Neighbors connected to a regular doctor" },
      { value: "31", label: "Saturdays, rain or shine" },
    ],
    statsSource: "Sample data · Source: Eastbank Health Collective visit logs, 2024–2025 seasons",
    quote: "People will tell you things over a basket of collards they'd never say in an exam room. This partnership taught us to show up where trust already lives.",
    quoteName: "Renée Castillo, RN",
    quoteRole: "Community Health Director, Eastbank Health Collective",
    imageUrl: "https://picsum.photos/seed/garden-clinic/900/1100",
    imageAlt: "A nurse checks a gardener's blood pressure at a folding table beside raised vegetable beds.",
    ctaLabel: "Become a partner",
    ctaHref: "#",
  },
  render: ({
    eyebrow,
    partnerName,
    logoUrl,
    heading,
    headingLevel,
    story,
    stats,
    statsSource,
    quote,
    quoteName,
    quoteRole,
    imageUrl,
    imageAlt,
    ctaLabel,
    ctaHref,
  }) => {
    const H = headingLevel || "h2";
    const paragraphs = (story || "").split(/\n\s*\n/).filter((p) => p.trim());
    const list = (stats ?? []).filter((s) => s?.value || s?.label);
    const hasMedia = Boolean(imageUrl || quote);

    const quoteCard = quote ? (
      <figure className="relative rounded-2xl bg-indigo-950 p-6 text-white shadow-xl shadow-indigo-950/20 sm:p-8">
        <svg aria-hidden="true" viewBox="0 0 24 18" fill="currentColor" className="h-5 w-auto text-indigo-400">
          <path d="M6.7 18C3 18 0 15.3 0 11.4 0 6.2 3.7 1.8 9.6 0l1.1 2.2C7.4 3.5 5.5 5.7 5.2 8.4c.5-.2 1-.3 1.6-.3 2.9 0 5.1 2.2 5.1 4.9 0 2.9-2.3 5-5.2 5Zm12.2 0c-3.7 0-6.7-2.7-6.7-6.6 0-5.2 3.7-9.6 9.6-11.4l1.2 2.2c-3.4 1.3-5.3 3.5-5.6 6.2.5-.2 1-.3 1.6-.3 3 0 5.2 2.2 5.2 4.9 0 2.9-2.4 5-5.3 5Z" />
        </svg>
        <blockquote className="mt-4 text-lg leading-8 font-medium text-pretty">
          <p>{quote}</p>
        </blockquote>
        {quoteName || quoteRole ? (
          <figcaption className="mt-6 border-t border-white/15 pt-4">
            {quoteName ? <p className="text-sm font-semibold">{quoteName}</p> : null}
            {quoteRole ? <p className="text-sm leading-6 text-indigo-200">{quoteRole}</p> : null}
          </figcaption>
        ) : null}
      </figure>
    ) : null;

    return (
      <section className="bg-neutral-50 px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className={`mx-auto grid max-w-7xl grid-cols-1 items-center gap-12 lg:gap-16 ${hasMedia ? "lg:grid-cols-12" : ""}`}>
          <div className={hasMedia ? "lg:col-span-7" : "max-w-3xl"}>
            {eyebrow || partnerName || logoUrl ? (
              <div className="flex flex-wrap items-center gap-x-4 gap-y-3">
                {eyebrow ? (
                  <p className="rounded-full bg-indigo-100 px-3 py-1 text-xs font-semibold tracking-wide text-indigo-800 uppercase">{eyebrow}</p>
                ) : null}
                {logoUrl ? (
                  <img src={logoUrl} alt={partnerName || ""} className="h-8 w-auto max-w-48 object-contain" />
                ) : partnerName ? (
                  <p className="flex items-center gap-2 font-serif text-lg font-semibold tracking-tight text-neutral-950">
                    <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="size-4 text-indigo-600">
                      <path d="M8 1 15 8 8 15 1 8Z" />
                    </svg>
                    {partnerName}
                  </p>
                ) : null}
              </div>
            ) : null}
            {heading ? (
              <H className="mt-6 text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl lg:text-5xl lg:leading-tight">{heading}</H>
            ) : null}
            {paragraphs.length ? (
              <div className="mt-6 space-y-4 text-lg leading-8 text-pretty text-neutral-700">
                {paragraphs.map((p, i) => (
                  <p key={i}>{p}</p>
                ))}
              </div>
            ) : null}

            {list.length ? (
              <dl className="mt-10 grid grid-cols-1 gap-6 border-t border-neutral-200 pt-8 sm:grid-cols-3">
                {list.map((s, i) => (
                  <div key={`${s.label}-${i}`} className="flex flex-col">
                    {s.label ? <dt className="order-2 mt-1 text-sm leading-6 text-pretty text-neutral-600">{s.label}</dt> : <dt className="sr-only">Outcome</dt>}
                    {s.value ? <dd className="order-1 text-3xl font-semibold tracking-tight text-indigo-700 tabular-nums">{s.value}</dd> : null}
                  </div>
                ))}
              </dl>
            ) : null}
            {statsSource ? <p className="mt-4 text-xs leading-5 text-neutral-600">{statsSource}</p> : null}

            {ctaLabel && ctaHref ? (
              <a
                href={ctaHref}
                className="mt-10 inline-flex min-h-11 items-center gap-2 rounded-md bg-indigo-600 px-5 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
              >
                {ctaLabel}
                <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="size-4">
                  <path fillRule="evenodd" d="M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z" clipRule="evenodd" />
                </svg>
              </a>
            ) : null}
          </div>

          {hasMedia ? (
            <div className="lg:col-span-5">
              {imageUrl ? (
                <img src={imageUrl} alt={imageAlt || ""} className="aspect-4/5 w-full rounded-3xl bg-neutral-200 object-cover sm:aspect-3/2 lg:aspect-4/5" />
              ) : null}
              {quoteCard ? <div className={imageUrl ? "relative mx-3 -mt-16 sm:mx-8 sm:-mt-24 lg:mr-0 lg:-ml-16" : ""}>{quoteCard}</div> : null}
            </div>
          ) : null}
        </div>
      </section>
    );
  },
};
```
