Skip to content

Commit 9ac03b3

Browse files
committed
Fixed and contexts and made it better
1 parent 50f7d54 commit 9ac03b3

File tree

8 files changed

+63
-12
lines changed

8 files changed

+63
-12
lines changed

src/components/commons/Input/style.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
background: #7f7f7f88;
55
border: 0.25rem solid #ffffff1a;
66
border-radius: 0.75rem;
7-
box-shadow: 0 0 2rem 1rem #0000004d;
87
font-size: 1rem;
98
padding: 0.5rem;
109
cursor: text;

src/components/engine/BaseVariant/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.node-base-input {
22
grid-column: 1 / -1;
3+
flex-basis: 100%;
34
padding: 0.5rem 0.25rem;
45
}
56

src/components/engine/DecorativeNode/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.decorative-node {
2+
flex-basis: 100%;
23
grid-column: 1 / -1;
34
margin-top: 0.5rem;
45
display: flex;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import "./style.css";
2+
3+
export function FillerNode() {
4+
return (<>
5+
<div className="filler-node-wrapper">
6+
<span className="filler-node" />
7+
</div>
8+
</>);
9+
}
10+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.filler-node-wrapper {
2+
--size: 3rem;
3+
--icon-size: 1.5rem;
4+
5+
position: relative;
6+
width: var(--size);
7+
height: 0;
8+
}
9+
10+
.filler-node {
11+
width: var(--size);
12+
height: 0;
13+
display: flex;
14+
align-items: center;
15+
justify-content: center;
16+
pointer-events: none;
17+
}
18+

src/components/engine/Node/style.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
.node {
1+
.node-wrapper {
22
--size: 3rem;
33
--icon-size: 1.5rem;
44

5+
position: relative;
6+
width: var(--size);
7+
height: var(--size);
8+
}
9+
10+
.node {
511
width: var(--size);
612
height: var(--size);
713
display: flex;
@@ -95,9 +101,3 @@
95101
display: none;
96102
}
97103

98-
.node-wrapper {
99-
position: relative;
100-
width: var(--size);
101-
height: var(--size);
102-
}
103-

src/components/engine/NodeContext/index.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Glass } from "@components/commons/Glass";
55
import { Canvas } from "@components/engine/Canvas";
66
import { Node } from "@components/engine/Node";
77
import { Variants } from "@components/engine/Variants";
8+
import { FillerNode } from "@components/engine/FillerNode";
89

910
import "./style.css";
1011

@@ -38,13 +39,21 @@ export function NodeContext({
3839

3940
{
4041
(!isBase && showCanvas) && (<>
42+
<span className="context-break" />
4143
<Glass className="context-canvas">
4244
<Canvas baseId={nodeId} />
4345
</Glass>
4446
</>)
4547
}
4648

4749
<Variants node={node} />
50+
<div className="context-length">
51+
<FillerNode />
52+
<FillerNode />
53+
<FillerNode />
54+
<FillerNode />
55+
<FillerNode />
56+
</div>
4857
</Glass>
4958
</>);
50-
}
59+
}

src/components/engine/NodeContext/style.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
left: 50%;
55
padding: 1rem;
66
cursor: default;
7-
display: grid;
8-
grid-template-columns: repeat(5, 1fr);
7+
display: flex;
8+
flex-wrap: wrap;
99
gap: 0.5rem;
1010
transform: translateX(-50%) translateY(-50%) scale(0);
1111
opacity: 0;
@@ -33,6 +33,19 @@
3333

3434
.context-canvas {
3535
grid-column: 1 / -1;
36-
margin-top: 0.5rem;
36+
flex-basis: 100%;
37+
}
38+
39+
.context-break {
40+
flex-basis: 100%;
41+
height: 0;
42+
}
43+
44+
.context-length {
45+
flex-basis: 100%;
46+
height: 0;
47+
display: flex;
48+
gap: 0.5rem;
49+
margin-top: -20px;
3750
}
3851

0 commit comments

Comments
 (0)