summaryrefslogtreecommitdiff
path: root/packages/integrations/markdoc/components/RenderNode.astro
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2023-03-21 08:17:20 -0400
committerGravatar GitHub <noreply@github.com> 2023-03-21 08:17:20 -0400
commit86273b5881cc61ebee11d40280b4c0aba8f4bb2e (patch)
treee8846e535df75ddecfc83c092bf8cdff5144c5c3 /packages/integrations/markdoc/components/RenderNode.astro
parent6afb1efea8601cc2bfacec27a8d09c2533fb704a (diff)
downloadastro-86273b5881cc61ebee11d40280b4c0aba8f4bb2e.tar.gz
astro-86273b5881cc61ebee11d40280b4c0aba8f4bb2e.tar.zst
astro-86273b5881cc61ebee11d40280b4c0aba8f4bb2e.zip
[Markdoc] Refactor Renderer internals to use `renderComponent()` (#6607)
* wip: new TreeNode setup * fix: pass children through `render` * deps: remove stringify-attributes * chore: changeset --------- Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/markdoc/components/RenderNode.astro')
-rw-r--r--packages/integrations/markdoc/components/RenderNode.astro30
1 files changed, 0 insertions, 30 deletions
diff --git a/packages/integrations/markdoc/components/RenderNode.astro b/packages/integrations/markdoc/components/RenderNode.astro
deleted file mode 100644
index a683cd983..000000000
--- a/packages/integrations/markdoc/components/RenderNode.astro
+++ /dev/null
@@ -1,30 +0,0 @@
----
-import stringifyAttributes from 'stringify-attributes';
-import type { AstroNode } from './astroNode';
-
-type Props = {
- node: AstroNode;
-};
-
-const Node = (Astro.props as Props).node;
----
-
-{
- typeof Node === 'string' ? (
- <Fragment set:text={Node} />
- ) : 'component' in Node ? (
- <Node.component {...Node.props}>
- {Node.children.map((child) => (
- <Astro.self node={child} />
- ))}
- </Node.component>
- ) : (
- <Fragment>
- <Fragment set:html={`<${Node.tag} ${stringifyAttributes(Node.attributes)}>`} />
- {Node.children.map((child) => (
- <Astro.self node={child} />
- ))}
- <Fragment set:html={`</${Node.tag}>`} />
- </Fragment>
- )
-}