Skip to content

Commit 50f7d54

Browse files
committed
Better Decorative Nodes
1 parent 5239696 commit 50f7d54

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/components/engine/DecorativeNode/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { NodeModel } from "@defs/Node"
22

3+
import { DynamicIcon } from "@components/commons/DynamicIcon";
4+
35
import "./style.css";
46

57
export function DecorativeNode({
@@ -8,7 +10,8 @@ export function DecorativeNode({
810
node: NodeModel;
911
}) {
1012
return (<>
11-
<div className="decorative-node">
13+
<div className="decorative-node" style={{ color: node.color }}>
14+
<DynamicIcon className="decorative-node-icon" icon={node.icon} />
1215
<span className="decorative-node-name">{node.name}</span>
1316
</div>
1417
</>);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
.decorative-node {
22
grid-column: 1 / -1;
33
margin-top: 0.5rem;
4+
display: flex;
5+
align-items: center;
6+
justify-content: start;
7+
gap: 0.25rem;
8+
background-color: currentColor;
9+
border-radius: 0.25rem;
410
}
511

612
.decorative-node:first-child {
713
margin-top: 0;
814
}
915

16+
.decorative-node-icon {
17+
height: 100%;
18+
padding: 0.25rem;
19+
}
20+

0 commit comments

Comments
 (0)