Files

59 lines
1.2 KiB
TypeScript

import { cn } from "@/lib/utils";
interface SectionHeadingProps {
title: string;
subtitle?: string;
eyebrow?: string;
align?: "left" | "center";
dark?: boolean;
className?: string;
}
export function SectionHeading({
title,
subtitle,
eyebrow,
align = "center",
dark = false,
className,
}: SectionHeadingProps) {
return (
<div
className={cn(
"flex flex-col gap-2 mb-10 md:mb-14",
align === "center" ? "items-center text-center" : "items-start text-left",
className
)}
>
{eyebrow && (
<span
className={cn(
"text-xs md:text-sm font-semibold uppercase tracking-wider font-heading",
"text-accent"
)}
>
{eyebrow}
</span>
)}
<h2
className={cn(
"text-3xl md:text-4xl font-bold leading-tight font-heading max-w-3xl",
dark ? "text-white" : "text-primary"
)}
>
{title}
</h2>
{subtitle && (
<p
className={cn(
"text-base md:text-lg max-w-2xl leading-relaxed mt-1",
dark ? "text-slate-300" : "text-text-muted"
)}
>
{subtitle}
</p>
)}
</div>
);
}