Files
AgentCompany/landing/components/ui/button.tsx
T
ZacharyZhang-NY 72e3abacf9 Rebuild footer, finalize structure, and refresh social metadata
- footer: dark #050e11 band with an Instrument Serif display CTA, an inverted
  Download button, link columns (tracked download hrefs preserved) and copyright
- structure: move icon-mark to brand/, theme provider+toggle to theme/,
  site-constants to lib/; sections/layout/ui/brand/theme now fully separated
- button: add an inverted variant for dark surfaces
- metadata: point OpenGraph/Twitter at a 1200x630 og.jpg and the JSON-LD
  screenshot at dashboard.webp; drop the old /screenshots references
- remove orphans: framer-motion (replaced by CSS + IntersectionObserver),
  ascii-background, and the seven superseded product screenshots
- add @playwright/test for the e2e suite
2026-07-07 22:24:33 -04:00

49 lines
1.3 KiB
TypeScript

import type { ReactNode } from "react";
type ButtonVariant = "primary" | "ghost" | "inverted";
type ButtonSize = "md" | "sm";
const base =
"eyebrow inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[20px] text-sm transition-colors";
const sizeClasses: Record<ButtonSize, string> = {
md: "h-11 px-6",
sm: "h-9 px-4",
};
const variantClasses: Record<ButtonVariant, string> = {
primary: "bg-[var(--cta)] text-[var(--text-on-cta)] hover:bg-[var(--cta-hover)]",
ghost: "border border-[var(--border-strong)] text-[var(--text-secondary)] hover:border-[var(--muted)]",
inverted: "bg-[#fbfdf6] text-[#0a1d08] hover:bg-[#fbfdf6]/90",
};
/** Link-styled call to action. Every landing CTA is an anchor. */
export function Button({
children,
href,
variant = "primary",
size = "md",
external = false,
className = "",
"aria-label": ariaLabel,
}: {
children: ReactNode;
href: string;
variant?: ButtonVariant;
size?: ButtonSize;
external?: boolean;
className?: string;
"aria-label"?: string;
}) {
return (
<a
href={href}
aria-label={ariaLabel}
{...(external ? { target: "_blank", rel: "noopener noreferrer" } : {})}
className={`${base} ${sizeClasses[size]} ${variantClasses[variant]} ${className}`}
>
{children}
</a>
);
}