scroll in xml cell data view

This commit is contained in:
SPRINX0\prochazka
2025-02-27 12:44:34 +01:00
parent 2ad739419a
commit 1d02927f6b
3 changed files with 18 additions and 10 deletions

View File

@@ -4,6 +4,19 @@
export let selection;
</script>
{#each selection as cell}
<XmlHighlighter code={cell.value} />
{/each}
<div class="wrapper">
{#each selection as cell}
<XmlHighlighter code={cell.value} />
{/each}
</div>
<style>
.wrapper {
overflow: scroll;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>

View File

@@ -24,19 +24,13 @@
</script>
{#key formattedCode}
<pre><code bind:this={codeBlock}>{formattedCode}</code></pre>
<pre bind:this={codeBlock}>{formattedCode}</pre>
{/key}
<style>
pre {
margin: 0;
padding: 0;
width: 100%;
}
code {
display: block;
padding: 0.5em;
overflow-x: auto;
}
</style>