--- // Import the necessary modules import { Image } from 'astro:assets'; import PrimaryCTA from '@components/ui/buttons/PrimaryCTA.astro'; // Destructure the props passed to the Astro component const { title, subTitle, btnExists, btnTitle, btnURL, img, imgAlt } = Astro.props; // Define TypeScript interface for props interface Props { title: string; subTitle: string; btnExists?: boolean; btnTitle?: string; btnURL?: string; img: any; imgAlt: any; } --- {/* The root section of the component */}
{/* The Image component which renders the image */} {imgAlt} {/* The container for title, subtitle, and optional CTA button */}
{/* The title of the section */}

{title}

{/* The subtitle of the section */}

{subTitle}

{/* Conditionally render the Primary CTA button if btnExists is true */} {btnExists ? : null}