// LandingCta — big final "start shipping" section with a deploy-style // animated gradient backdrop. Use once near the footer. import type { ComponentType, ReactNode } from 'react' import { cn } from '../cn' import type { ShellLinkProps } from './docShell' interface LandingCtaProps { readonly title: ReactNode readonly subtitle?: ReactNode readonly primaryCta: { readonly label: string; readonly href: string } readonly secondaryCta?: { readonly label: string; readonly href: string } readonly footnote?: ReactNode readonly className?: string readonly LinkComponent?: ComponentType } // A schemed href (`https://…`) points off-origin → open in a new tab with a safe // rel; relative/hash hrefs stay same-tab. const isSchemed = (href: string): boolean => /^[a-z][a-z0-9+.-]*:\/\//i.test(href) const PlainLink = ({ to, className, children }: ShellLinkProps): ReactNode => isSchemed(to) ? {children} : {children} export const LandingCta = ({ title, subtitle, primaryCta, secondaryCta, footnote, className, LinkComponent = PlainLink, }: LandingCtaProps): ReactNode => { const Link = LinkComponent return (

{title}

{subtitle ? (

{subtitle}

) : null}
{primaryCta.label} {secondaryCta ? ( {secondaryCta.label} ) : null}
{footnote ? (
{footnote}
) : null}
) }