可拖动调整大小的面板
This commit is contained in:
@@ -63,17 +63,11 @@
|
||||
|
||||
.sidebar-left,
|
||||
.sidebar-right {
|
||||
width: 250px;
|
||||
height: 100%;
|
||||
background-color: #252526;
|
||||
border-right: 1px solid #3e3e3e;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-right {
|
||||
border-right: none;
|
||||
border-left: 1px solid #3e3e3e;
|
||||
}
|
||||
|
||||
.sidebar-left h3,
|
||||
.sidebar-right h3 {
|
||||
font-size: 14px;
|
||||
@@ -91,16 +85,13 @@
|
||||
}
|
||||
|
||||
.main-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
background-color: #1e1e1e;
|
||||
border-bottom: 1px solid #3e3e3e;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -113,9 +104,8 @@
|
||||
}
|
||||
|
||||
.bottom-panel {
|
||||
height: 200px;
|
||||
height: 100%;
|
||||
background-color: #252526;
|
||||
padding: 12px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
77
packages/editor-app/src/styles/ResizablePanel.css
Normal file
77
packages/editor-app/src/styles/ResizablePanel.css
Normal file
@@ -0,0 +1,77 @@
|
||||
.resizable-panel {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.resizable-panel-horizontal {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.resizable-panel-vertical {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.panel-section {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.resizer {
|
||||
background: #252526;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.resizer:hover {
|
||||
background: #094771;
|
||||
}
|
||||
|
||||
.resizer-horizontal {
|
||||
width: 4px;
|
||||
cursor: col-resize;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.resizer-vertical {
|
||||
height: 4px;
|
||||
cursor: row-resize;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.resizer-handle {
|
||||
position: absolute;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.resizer-horizontal .resizer-handle {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 12px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.resizer-vertical .resizer-handle {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 40px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.resizer:active {
|
||||
background: #0e6caa;
|
||||
}
|
||||
|
||||
body.resizing {
|
||||
cursor: col-resize !important;
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
body.resizing-vertical {
|
||||
cursor: row-resize !important;
|
||||
user-select: none !important;
|
||||
}
|
||||
Reference in New Issue
Block a user