Render if the node has children.
This commit is contained in:
parent
6901541fe4
commit
4847ec07d8
@ -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 {
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user