1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-20 04:23:16 +00:00

Fix editor layout

This commit is contained in:
2025-07-01 20:54:52 +02:00
parent 510b17d8ef
commit 32161acfbd
2 changed files with 20 additions and 8 deletions
+14 -8
View File
@@ -352,15 +352,21 @@ export default function App() {
Download
</button>
</div>
<div onDragOver={(e) => e.preventDefault()} onDrop={(e) => handleDrop(e, (t) =>
setTabs((tabs) =>
tabs.map((tab) =>
tab.id === active ? { ...tab, xslt: stripParamBlock(t) } : tab,
),
)
)}>
<div
className="editor-area"
onDragOver={(e) => e.preventDefault()}
onDrop={(e) =>
handleDrop(e, (t) =>
setTabs((tabs) =>
tabs.map((tab) =>
tab.id === active ? { ...tab, xslt: stripParamBlock(t) } : tab,
),
)
)
}
>
<Editor
height="calc(100% - 40px)"
height="100%"
language="xml"
value={editorFocused ? activeTab.xslt : injectParamBlock(activeTab.xslt, activeTab.params)}
onChange={(v) =>
+6
View File
@@ -73,6 +73,12 @@ body,
padding: 0.5rem;
overflow: hidden;
height: 100%;
display: flex;
flex-direction: column;
}
.editor-area {
flex: 1 1 auto;
}
.result {