diff options
| author | Adam Soltys <[email protected]> | 2023-02-28 00:43:53 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-28 00:43:53 -0800 |
| commit | 759c053c3ae1eb8f3d885b12cd1a5e7ba11cfa78 (patch) | |
| tree | 8f59fc8c5a4879734785d9164e2ea63feb4ab90a /src/components | |
| parent | ce3a8006405be03fa96240fc0adaa7c1fa1c1009 (diff) | |
| download | coinos-ui-759c053c3ae1eb8f3d885b12cd1a5e7ba11cfa78.tar.gz coinos-ui-759c053c3ae1eb8f3d885b12cd1a5e7ba11cfa78.zip | |
docs
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Code.svelte | 22 |
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> |
