fix: render attributes to html

This commit is contained in:
bholmesdev 2023-02-06 17:04:22 -05:00
parent 4b45522c88
commit 2b81656b67

View file

@ -1,4 +1,5 @@
---
import stringifyAttributes from 'stringify-attributes';
import type { AstroNode } from './astroNode';
type Props = {
@ -19,7 +20,7 @@ const Node = (Astro.props as Props).node;
</Node.component>
) : (
<Fragment>
<Fragment set:html={`<${Node.tag}>`} />
<Fragment set:html={`<${Node.tag} ${stringifyAttributes(Node.attributes)}>`} />
{Node.children.map((child) => (
<Astro.self node={child} />
))}