32 lines
765 B
TypeScript
32 lines
765 B
TypeScript
interface SectionHeadingProps {
|
|
title: string;
|
|
subtitle?: string;
|
|
align?: "left" | "center";
|
|
}
|
|
|
|
export function SectionHeading({
|
|
title,
|
|
subtitle,
|
|
align = "center",
|
|
}: SectionHeadingProps) {
|
|
return (
|
|
<div className={`mb-12 ${align === "center" ? "text-center" : "text-left"}`}>
|
|
<h2
|
|
className="text-3xl md:text-4xl font-bold tracking-tight"
|
|
style={{
|
|
fontSize: "var(--text-3xl)",
|
|
lineHeight: "var(--text-3xl-line-height)",
|
|
letterSpacing: "var(--text-3xl-letter-spacing)",
|
|
}}
|
|
>
|
|
{title}
|
|
</h2>
|
|
{subtitle && (
|
|
<p className="mt-4 text-muted max-w-2xl mx-auto" style={{ fontSize: "var(--text-lg)" }}>
|
|
{subtitle}
|
|
</p>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|