|
1 | 1 | <script lang="ts">
|
2 |
| - import { createEventDispatcher, onMount } from 'svelte'; |
| 2 | + import { createEventDispatcher } from 'svelte'; |
3 | 3 | import { readable, writable } from 'svelte/store';
|
4 | 4 |
|
5 | 5 | import Fa from 'svelte-fa';
|
6 |
| - import { faXmark } from '@fortawesome/free-solid-svg-icons'; |
| 6 | + import { faCompress, faDownload, faXmark } from '@fortawesome/free-solid-svg-icons'; |
7 | 7 | import { createTable, Subscribe, Render, createRender } from 'svelte-headless-table';
|
8 | 8 | import {
|
9 | 9 | addSortBy,
|
|
543 | 543 | {/if}
|
544 | 544 |
|
545 | 545 | <div
|
546 |
| - class="flex justify-between items-center w-full {search && 'py-2'} {!search && |
| 546 | + class="flex justify-between overflow-x-auto items-center w-full {search && |
| 547 | + 'py-2'} {!search && |
547 | 548 | (shownColumns.length > 0 || toggle || resizable !== 'none' || exportable) &&
|
548 | 549 | 'pb-2'}"
|
549 | 550 | >
|
|
569 | 570 | {#if resizable !== 'none'}
|
570 | 571 | <button
|
571 | 572 | type="button"
|
572 |
| - class="btn btn-sm variant-filled-primary rounded-full order-last" |
| 573 | + class="btn btn-sm variant-filled-primary rounded-full order-last flex gap-2 items-center" |
573 | 574 | aria-label="Reset sizing of columns and rows"
|
574 | 575 | on:click|preventDefault={() =>
|
575 | 576 | resetResize($headerRows, $pageRows, tableId, columns, resizable)}
|
576 |
| - >Reset sizing</button |
| 577 | + ><Fa icon={faCompress} /> Reset sizing</button |
577 | 578 | >
|
578 | 579 | {/if}
|
579 | 580 | {#if exportable}
|
580 | 581 | <button
|
581 | 582 | type="button"
|
582 |
| - class="btn btn-sm variant-filled-primary rounded-full order-last" |
| 583 | + class="btn btn-sm variant-filled-primary rounded-full order-last flex items-center gap-2" |
583 | 584 | aria-label="Export table data as CSV"
|
584 | 585 | on:click|preventDefault={() => exportAsCsv(tableId, jsonToCsv($exportedData))}
|
585 |
| - >Export as CSV</button |
| 586 | + ><Fa icon={faDownload} /> Export as CSV</button |
586 | 587 | >
|
587 | 588 | {/if}
|
588 | 589 | {#if shownColumns.length > 0}
|
|
0 commit comments