add tanstack table, add clients table

This commit is contained in:
Gregor Vostrak
2024-09-26 18:58:32 +02:00
parent 8b50f33cc9
commit 6b84ba67cd
7 changed files with 259 additions and 81 deletions

View File

@@ -0,0 +1,26 @@
<script setup lang="ts" generic="T">
import { twMerge } from 'tailwind-merge';
import type { Cell, Header } from '@tanstack/vue-table';
defineProps<{
cell: Cell<T, unknown> | Header<T, unknown>;
}>();
</script>
<template>
<div
:class="
twMerge(
'whitespace-nowrap px-3 py-0.5 text-sm text-muted flex space-x-1 items-center font-medium',
cell.column.getIndex() === 0 &&
'pl-4 sm:pl-6 lg:pl-8 3xl:pl-12',
cell.column.getIndex() ===
cell.getContext().table.getAllColumns().length - 1 &&
'pr-4 sm:pr-6 lg:pr-8 3xl:pr-12'
)
">
<slot></slot>
</div>
</template>
<style scoped></style>