feat(Table): handle meta.class on th and td (#2790)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Christian López C
2024-12-02 07:43:08 -05:00
committed by GitHub
parent f712135576
commit 004a577467
2 changed files with 22 additions and 2 deletions

View File

@@ -164,6 +164,12 @@ const columns: TableColumn<Payment>[] = [{
}, {
accessorKey: 'date',
header: 'Date',
meta: {
class: {
td: 'text-center font-semibold',
th: 'text-right text-green-500 w-48'
}
},
cell: ({ row }) => {
return new Date(row.getValue('date')).toLocaleString('en-US', {
day: 'numeric',
@@ -318,6 +324,9 @@ onMounted(() => {
:column-pinning="columnPinning"
:loading="loading"
sticky
:ui="{
tr: 'divide-x divide-[var(--ui-border)]'
}"
class="border border-[var(--ui-border-accented)] rounded-[var(--ui-radius)] flex-1"
>
<template #expanded="{ row }">