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:
+14
-8
@@ -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) =>
|
||||
|
||||
@@ -73,6 +73,12 @@ body,
|
||||
padding: 0.5rem;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.editor-area {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.result {
|
||||
|
||||
Reference in New Issue
Block a user