--- interface Item { name: string; value: string; } export interface Props { title?: string; subtitle?: string; highlight?: string; items?: Array; } const { title = await Astro.slots.render('title'), subtitle = await Astro.slots.render('subtitle'), highlight, items = [], } = Astro.props; ---
{ (title || subtitle || highlight) && (
{highlight && (

{highlight}

)} {title && (

)} {subtitle && (

)}

) }
{ items.map(({ name, value }) => (
{value}

{name}

)) }