Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

1.3 KB
Raw Blame
import { cn } from "@rallly/ui";
import type * as React from "react";
import { CaptureOnView } from "@/components/home/capture-on-view";
import { CtaButton } from "@/components/home/cta-button";
import { handwritten } from "@/fonts/handwritten";

export function Cta({
  title,
  description,
  buttonLabel,
  hint,
}: {
  title: React.ReactNode;
  description: React.ReactNode;
  buttonLabel: React.ReactNode;
  hint: React.ReactNode;
}) {
  return (
    <CaptureOnView event="landing:final_cta_view">
      <div className="text-center">
        <h2 className="mx-auto max-w-[700px] text-balance font-medium text-2xl text-gray-800 leading-tight tracking-tight sm:text-4xl">
          {title}
        </h2>
        <p className="mx-auto mt-4 max-w-prose text-pretty text-base/6 text-gray-500 sm:text-lg">
          {description}
        </p>
      </div>
      <div className="mt-8 flex flex-col items-center gap-4">
        <CtaButton size="lg" captureEvent="landing:final_cta_click" cta="final">
          {buttonLabel}
        </CtaButton>
        <p
          className={cn(
            "whitespace-nowrap text-gray-600 text-xs",
            handwritten.className,
            "decoration underline decoration-2 decoration-gray-300 underline-offset-8",
          )}
        >
          {hint}
        </p>
      </div>
    </CaptureOnView>
  );
}