Skip to documentation

Design system / Sources & standards

Current repository source

imageCtaBanner.tsx

src/components/editorial/imageCtaBanner.tsx

This view contains the escaped source read during the deployment build. Code and policy text are unchanged. Markdown is shown as source, not rendered as a document. A new deployment refreshes the content.

import type { ReactNode } from "react";
import { Card } from "@/components/ui/card";
import { Text } from "@/components/ui/text";

/** Editorial CTA molecule. Its opaque copy surface never relies on an image overlay for contrast. */
export function ImageCtaBanner({
  eyebrow,
  title,
  description,
  status,
  action,
  imageUrl,
  headingLevel = 3,
}: {
  eyebrow: ReactNode;
  title: ReactNode;
  description: ReactNode;
  status?: ReactNode;
  action: ReactNode;
  imageUrl?: string | null;
  headingLevel?: 2 | 3;
}) {
  const Heading = `h${headingLevel}` as "h2" | "h3";
  return (
    <Card elevation="flat" className="overflow-hidden p-0">
      <div className={imageUrl ? "grid lg:grid-cols-[minmax(0,3fr)_minmax(18rem,2fr)]" : "grid"}>
        {imageUrl && (
          <div className="relative h-48 min-w-0 bg-muted lg:order-2 lg:h-auto lg:min-h-80">
            {/* Storage returns tenant-scoped signed URLs; the image is decorative beside the named heading. */}
            {/* eslint-disable-next-line @next/next/no-img-element */}
            <img src={imageUrl} alt="" className="absolute inset-0 size-full object-cover" />
          </div>
        )}
        <div className="flex min-w-0 flex-col justify-between gap-8 bg-card p-6 text-card-foreground sm:p-8 lg:p-10">
          <div className="space-y-8">
            <div className="flex flex-wrap items-center justify-between gap-3">
              <Text variant="eyebrow" className="uppercase text-text-muted">{eyebrow}</Text>
              {status}
            </div>
            <div className="space-y-4">
              <Heading className="break-words text-secondary-title-jumbo font-semibold tracking-tight">{title}</Heading>
              <Text rhythm="loose" className="max-w-2xl">{description}</Text>
            </div>
          </div>
          <div>{action}</div>
        </div>
      </div>
    </Card>
  );
}
All sources and standards
Current components and theme tokens. Fictional example data. Source views refresh on deployment; authors maintain contract notes.