---
// inlines a diagram svg so it can use the theme's css variables (see the
// .diagram rules in styles/diagrams.css). import the file with ?raw
interface Props {
svg: string;
caption?: string;
}
const { svg, caption } = Astro.props;
---
<figure class="diagram not-content">
<Fragment set:html={svg} />
{caption && <figcaption>{caption}</figcaption>}
</figure>