astro/packages/integrations/markdoc/components/Renderer.astro
2023-03-03 08:42:48 -05:00

15 lines
423 B
Text

---
import type { RenderableTreeNode } from '@markdoc/markdoc';
import type { AstroInstance } from 'astro';
import { createAstroNode } from './astroNode';
import RenderNode from './RenderNode.astro';
type Props = {
content: RenderableTreeNode;
components: Record<string, AstroInstance['default']>;
};
const { content, components } = Astro.props as Props;
---
<RenderNode node={createAstroNode(content, components)} />