--- import { Icon } from 'astro-icon'; import { Picture } from '@astrojs/image/components'; interface CallToAction { text: string; href: string; icon?: string; } export interface Props { title?: string; subtitle?: string; callToAction?: string | CallToAction; callToAction2?: string | CallToAction; image?: string | any; // TODO: find HTMLElementProps } const { title = await Astro.slots.render('title'), subtitle = await Astro.slots.render('subtitle'), content = await Astro.slots.render('content'), callToAction = await Astro.slots.render('callToAction'), callToAction2 = await Astro.slots.render('callToAction2'), image = await Astro.slots.render('image'), } = Astro.props; ---
{ title && (

) }
{subtitle &&

}

{ callToAction && (
{typeof callToAction === 'string' ? ( ) : ( {callToAction?.icon && ( <> {' '} )} {callToAction?.text} )}
) } { callToAction2 && (
{typeof callToAction2 === 'string' ? ( ) : ( {callToAction2?.icon && ( <> {' '} )} {callToAction2.text} )}
) }
{content && }

{ image && (
{typeof image === 'string' ? ( ) : ( )}
) }