2023-02-06 21:11:15 +00:00
|
|
|
---
|
|
|
|
import type { RenderableTreeNode } from '@markdoc/markdoc';
|
2023-03-01 19:20:48 +00:00
|
|
|
import type { AstroInstance } from 'astro';
|
|
|
|
import { createAstroNode } from './astroNode';
|
2023-02-06 21:11:15 +00:00
|
|
|
import RenderNode from './RenderNode.astro';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
content: RenderableTreeNode;
|
2023-03-01 19:20:48 +00:00
|
|
|
components: Record<string, AstroInstance['default']>;
|
2023-02-06 21:11:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const { content, components } = Astro.props as Props;
|
|
|
|
---
|
|
|
|
|
|
|
|
<RenderNode node={createAstroNode(content, components)} />
|