fix: render attributes to html
This commit is contained in:
parent
dc906d8a9c
commit
570b83d525
1 changed files with 2 additions and 1 deletions
|
@ -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} />
|
||||
))}
|
||||
|
|
Loading…
Reference in a new issue