--- import type { Stats as Props } from 'types'; import WidgetWrapper from '../ui/WidgetWrapper.astro'; import Headline from '../ui/Headline.astro'; import { Icon } from 'astro-icon/components'; const { title = await Astro.slots.render('title'), subtitle = await Astro.slots.render('subtitle'), tagline, stats = [], id, isDark = false, classes = {}, bg = await Astro.slots.render('bg'), } = Astro.props; ---
{ stats && stats.map(({ amount, title, icon }) => (
{icon && (
)} {amount && (
{amount}
)} {title && (
{title}
)}
)) }