--- import { Icon } from 'astro-icon'; interface Item { question: string; answer: 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 && (

)} {title && (

)} {subtitle &&

}

) }
{ items && items.map((subitems) => (
{subitems.map(({ question, answer }) => (

{question}

{answer &&
}
))}
)) }