Render if the node has children.

This commit is contained in:
Tom Alexander 2024-01-23 22:05:07 -05:00
parent 6901541fe4
commit 4847ec07d8
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 9 additions and 1 deletions

View File

@ -1,9 +1,14 @@
.OrgAst {
flex: 1;
background: green;
background: #eeeeee;
padding: 5px;
overflow: scroll;
}
.OrgAstNode {
border: 1px solid #000000;
background: #ffffff;
padding: 5px;
}
.OrgAstNodeType {

View File

@ -25,6 +25,9 @@ const OrgAstNode = (props: {node: any}) => {
return (
<div className={styles.OrgAstNode}>
<div className={styles.OrgAstNodeType}>{props.node["ast-node"]}</div>
{Array.isArray(props.node.children) && props.node.children.length > 0 ? (<>
Has children
</>) : null}
</div>
);
}