--- import Image from '~/components/common/Image.astro'; import Button from '~/components/ui/Button.astro'; import type { CallToAction } from '~/types'; export interface Props { id?: string; title?: string; title2?: string; subtitle?: string; tagline?: string; content?: string; actions?: string | CallToAction[]; image?: string | unknown; // TODO: find HTMLElementProps } const { id, title = await Astro.slots.render('title'), title2 = await Astro.slots.render('title2'), subtitle = await Astro.slots.render('subtitle'), tagline, content = await Astro.slots.render('content'), actions = await Astro.slots.render('actions'), image = await Astro.slots.render('image'), } = Astro.props; ---
{ tagline && (

) } { title && (

) } { title2 && (

) }
{subtitle &&

} { actions && (

{Array.isArray(actions) ? ( actions.map((action) => (
)) ) : ( )}
) }
{content && }

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