--- import { AstroError } from 'astro/errors'; import { slugToLocaleData, urlToSlug } from '../utils/slugs'; import { useTranslations } from '../utils/translations'; import Icon from './Icon.astro'; const asideVariants = ['note', 'tip', 'caution', 'danger'] as const; const icons = { note: 'information', tip: 'rocket', caution: 'warning', danger: 'error' } as const; interface Props { type?: (typeof asideVariants)[number]; title?: string; } let { type = 'note', title } = Astro.props; if (!asideVariants.includes(type)) { throw new AstroError( 'Invalid `type` prop passed to the `