aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Code.svelte22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/components/Code.svelte b/src/components/Code.svelte
index b3181d0a..0e09191e 100644
--- a/src/components/Code.svelte
+++ b/src/components/Code.svelte
@@ -5,11 +5,27 @@
export let sample;
</script>
-<div class="bg-black text-white rounded-lg p-4 flex gap-4 whitespace-pre-wrap font-mono">
- <div class="w-full break-all">{samples[sample]}</div>
+<div
+ class="bg-black text-white rounded-lg p-4 flex gap-4 whitespace-pre-wrap font-mono"
+>
+ <div class="overflow-x-scroll max-w-full scrollbar-hide">
+ <div class="break-all min-w-[800px]">{samples[sample]}</div>
+ </div>
<button
class="ml-auto my-auto invert opacity-90"
on:click={() => copy(samples[sample].replace(/^\s+/gm, '').replace(/\n/g, ''))}
- ><Icon icon="copy" style="w-8" /></button
+ ><Icon icon="copy" style="w-10 max-w-none" /></button
>
</div>
+
+<style>
+ .scrollbar-hide::-webkit-scrollbar {
+ display: none;
+ }
+
+ /* For IE, Edge and Firefox */
+ .scrollbar-hide {
+ -ms-overflow-style: none; /* IE and Edge */
+ scrollbar-width: none; /* Firefox */
+ }
+</style>