Lib: Hide table header if no data is passed

This commit is contained in:
2025-01-27 19:43:45 +01:00
parent a34cf50ace
commit 986a49377b

View File

@ -15,7 +15,8 @@
let { data, columns, handler = undefined }: TableProps = $props(); let { data, columns, handler = undefined }: TableProps = $props();
</script> </script>
<div class="table-container bg-white shadow"> {#if data.length > 0}
<div class="table-container bg-white shadow">
<table class="table table-compact bg-white"> <table class="table table-compact bg-white">
<thead> <thead>
<tr class="bg-surface-500"> <tr class="bg-surface-500">
@ -46,4 +47,5 @@
{/each} {/each}
</tbody> </tbody>
</table> </table>
</div> </div>
{/if}