Files
CollabTable/frontend/src/lib/components/lists/ListsTable.svelte
T

27 lines
747 B
Svelte
Raw Normal View History

<script>
import ListRow from './ListRow.svelte';
let { lists, fields, items, onSelect } = $props();
</script>
<table class="w-full text-left text-sm">
<thead>
<tr class="text-muted-fg">
<th class="py-2 font-medium">Name</th>
<th class="py-2 font-medium">Fields</th>
<th class="py-2 font-medium">Items</th>
<th class="py-2 font-medium">Updated</th>
</tr>
</thead>
<tbody>
{#each lists as list (list.id)}
<ListRow {list} {fields} {items} onClick={onSelect} />
{/each}
</tbody>
</table>
{#if lists.length === 0}
<div class="flex flex-col items-center gap-2 py-16 text-center">
<div class="text-4xl">🔍</div>
<div class="text-fg">No lists match your filters</div>
</div>
{/if}