diff --git a/src/components/Table.tsx b/src/components/Table.tsx index 67920ef2..9feb33e2 100644 --- a/src/components/Table.tsx +++ b/src/components/Table.tsx @@ -72,21 +72,22 @@ const emptyContentDefaultValue = ( ); -const TABLE_DEFAULT_STYLING = { +export const TABLE_DEFAULT_STYLING = { containerClassName: 'w-full mb-20', tableWrapperClassName: 'overflow-x-auto border border-solid border-base-content/10 rounded-lg', tableClassName: 'font-inter w-full table-auto text-sm font-medium', tableHeaderClassName: '', headerRowClassName: '', - headerColumnClassName: 'px-4 py-3 text-base-content/50', + headerColumnClassName: + 'px-4 py-3 border-base-content/10 text-base-content/50', tableBodyClassName: '', - bodyRowClassName: 'border-t border-t-base-content/10', + bodyRowClassName: 'border-t border-base-content/10', bodyColumnClassName: 'px-4 py-3 text-base-content', paginationClassName: '', - tableFooterClassName: 'bg-gray-100 font-semibold border border-gray-200', - footerRowClassName: 'border-t-2 border-gray-300', - footerColumnClassName: 'px-6 py-3 text-xs text-gray-900', + tableFooterClassName: 'font-semibold border-base-content/10', + footerRowClassName: 'bg-base-200 border-t-2 border-base-content/10', + footerColumnClassName: 'p-4 text-base-content whitespace-nowrap', }; const Table = ({ @@ -251,13 +252,15 @@ const Table = ({ { 'first:w-9 first:pr-0': withCheckbox, }, + { + 'border-b': header.colSpan > 1, + }, tableClassNames.headerColumnClassName )} >
1, + className={cn('flex items-center gap-1 min-h-full', { + 'justify-center': header.colSpan > 1, })} > {flexRender( @@ -321,13 +324,16 @@ const Table = ({ ))} - + {renderFooter && ( - + {table.getAllLeafColumns().map((column) => ( {column.columnDef.footer && flexRender(column.columnDef.footer, {