--- // Define props from Astro const { heading, content, isAddressVisible, addressContent, isLinkVisible, linkTitle, linkURL, isArrowVisible, } = Astro.props; // Define TypeScript interface for props interface Props { heading?: string; content?: string; isAddressVisible?: boolean; addressContent?: string; isLinkVisible?: boolean; linkTitle?: string; linkURL?: string; isArrowVisible?: boolean; } // Define SVG arrow to be used in the component const arrowSVG: string = ``; --- {/* Root container, which arranges the heading and content */}
{content}
{/* Conditional rendering of address content if isAddressVisible is true */} { isAddressVisible ? ({addressContent}
) : null } { /* Conditional rendering of a link if isLinkVisible is true. The link also conditionally includes an arrow SVG if isArrowVisible is true */ } { isLinkVisible ? ( {linkTitle} {isArrowVisible ?