72 lines
1.7 KiB
TypeScript
72 lines
1.7 KiB
TypeScript
import React from "react"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
export interface SectionHeaderProps {
|
|
kicker?: string
|
|
title: string
|
|
description?: string
|
|
action?: React.ReactNode
|
|
className?: string
|
|
titleClassName?: string
|
|
kickerClassName?: string
|
|
}
|
|
|
|
/**
|
|
* SectionHeader / SectionHeader1
|
|
* Unificirana komponenta sa podijeljenim zaglavljem:
|
|
* - Lijevo: Kicker / oznaka sekcije (npr. "Naši Proizvodi", "Naša Misija")
|
|
* - Desno: Veliki naslov i opcioni opis ili CTA
|
|
*/
|
|
export function SectionHeader({
|
|
kicker,
|
|
title,
|
|
description,
|
|
action,
|
|
className,
|
|
titleClassName,
|
|
kickerClassName,
|
|
}: SectionHeaderProps) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"flex flex-col lg:flex-row lg:items-start justify-between gap-6 mb-12 sm:mb-16",
|
|
className
|
|
)}
|
|
>
|
|
{/* Left Column: Kicker */}
|
|
{kicker && (
|
|
<div
|
|
className={cn(
|
|
"text-sm font-semibold tracking-wide text-muted-foreground uppercase shrink-0 pt-1.5",
|
|
kickerClassName
|
|
)}
|
|
>
|
|
{kicker}
|
|
</div>
|
|
)}
|
|
|
|
{/* Right Column: Title & Description */}
|
|
<div className="max-w-2xl space-y-3">
|
|
<h2
|
|
className={cn(
|
|
"text-3xl sm:text-4xl lg:text-5xl font-medium tracking-tight text-foreground leading-[1.18]",
|
|
titleClassName
|
|
)}
|
|
>
|
|
{title}
|
|
</h2>
|
|
{description && (
|
|
<p className="text-base sm:text-lg text-muted-foreground leading-relaxed">
|
|
{description}
|
|
</p>
|
|
)}
|
|
{action && <div className="pt-2">{action}</div>}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export const SectionHeader1 = SectionHeader
|
|
export default SectionHeader
|
|
|