-
Notifications
You must be signed in to change notification settings - Fork 3
/
App.vue
112 lines (99 loc) · 2.07 KB
/
App.vue
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<script setup lang="ts">
import { Panel, PanelGroup } from "vue-resizable-panels";
import ResizeHandle from "./ResizeHandle.vue";
</script>
<template>
<div class="PanelGroupWrapper">
<PanelGroup class="PanelGroup" direction="horizontal">
<Panel class="PanelRow" :defaultSize="20" :minSize="20">
<div class="Centered">left</div>
</Panel>
<ResizeHandle class="ResizeHandle" />
<Panel class="PanelRow" :minSize="30">
<div class="Centered">middle</div>
</Panel>
<ResizeHandle class="ResizeHandle" />
<Panel class="PanelRow" :defaultSize="20" :minSize="20">
<div class="Centered">right</div>
</Panel>
</PanelGroup>
</div>
</template>
<style scoped>
.PanelGroupWrapper {
height: 20rem;
background-color: grey;
}
.PanelGroup {
font-size: 2rem;
}
.Panel {
display: flex;
flex-direction: row;
font-size: 2rem;
}
.PanelColumn,
.PanelRow {
display: flex;
}
.PanelColumn {
flex-direction: column;
}
.PanelRow {
flex-direction: row;
}
.Centered {
flex: 1 1 auto;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--color-panel-background);
border-radius: 0.5rem;
overflow: auto;
font-size: 1rem;
padding: 0.5rem;
word-break: break-all;
}
.ResizeHandle {
background-color: red;
}
.Overflow {
width: 100%;
height: 100%;
overflow: auto;
padding: 1rem;
/* Firefox fixes */
scrollbar-width: thin;
scrollbar-color: var(--color-scroll-thumb) transparent;
}
.Button,
.ButtonDisabled {
background-color: var(--color-button-background);
color: var(--color-default);
border: none;
border-radius: 0.5rem;
padding: 0.25rem 0.5rem;
}
.Button:hover {
background-color: var(--color-button-background-hover);
}
.ButtonDisabled {
opacity: 0.5;
}
.Buttons {
display: flex;
flex-direction: row;
align-items: center;
gap: 1ch;
margin-bottom: 1rem;
}
.Capitalize {
text-transform: capitalize;
}
.WarningBlock {
display: inline-block;
background: var(--color-warning-background);
padding: 0.25em 1ch;
border-radius: 0.5rem;
}
</style>