astro/packages/integrations/markdoc/components/Renderer.astro

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
391 B
Text
Raw Normal View History

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