import "./Hero.css"; interface CTAItem { href: string; text: string; buttonClass?: string; } interface HeroProps { title: string; description: React.ReactNode; ctas: CTAItem[]; Link?: React.ComponentType>; } const CTA = (Link?: HeroProps["Link"]) => ({ href, text, buttonClass }: CTAItem, i: number) => { if (!Link) return ( {text} ); return ( {text} ); }; const Hero = ({ title, description, ctas, Link }: HeroProps) => { const ctaFunk = CTA(Link); const descriptionEl = typeof description === "string" ?

{description}

: description; return (

{title}

{descriptionEl}
{ctas.map(ctaFunk)}
); }; export default Hero;