-
Notifications
You must be signed in to change notification settings - Fork 0
/
Container.tsx
48 lines (45 loc) · 911 Bytes
/
Container.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export const Container: Component<{ class?: any, title?: string }, { children: any }> = function() {
this.css = css`
self {
position: relative;
border: 1px solid var(--accent);
}
.pseudo{
position: absolute;
display: flex;
top:0;
left: 1em;
transform: translateY(-50%);
}
.title {
padding-left:4px;
padding-right:4px;
background-color: var(--surface);
/* font-size: 15px; */
}
.bar {
position: relative;
height: 13px;
top: 4px;
width: 1px;
background-color: var(--accent);
z-order: 3;
}
`;
this.class ??= [];
return (
<div class={[...this.class]}>
{this.title &&
<div class="pseudo">
<div class="bar"></div>
<div class="title">
{this.title}
</div>
<div class="bar"></div>
</div>
|| ""
}
{this.children}
</div>
)
}