Skip to content

Commit 56c86e8

Browse files
committed
adjust cell padding
1 parent 7384299 commit 56c86e8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

components/dashboard/src/components/podkit/tables/SortableTable.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ export const SortableTableHead = React.forwardRef<
3131
{...props}
3232
aria-sort={sortOrder === "asc" ? "ascending" : sortOrder === "desc" ? "descending" : "none"}
3333
>
34-
<Button variant="ghost" onClick={handleClick} className="flex flex-row items-center gap-1 font-semibold">
34+
<Button
35+
variant="ghost"
36+
onClick={handleClick}
37+
className="flex flex-row items-center gap-1 font-semibold p-0 -h-9"
38+
>
3539
{children}
3640
{/* keep element in dom to preserve space */}
3741
<span className={cn(!sortOrder && "invisible")}>
38-
{sortOrder === "asc" ? <ChevronUpIcon size={20} /> : <ChevronDownIcon size={20} />}
42+
{sortOrder === "asc" ? <ChevronUpIcon size={24} /> : <ChevronDownIcon size={24} />}
3943
</span>
4044
</Button>
4145
</TableHead>

components/dashboard/src/components/podkit/tables/Table.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLA
2727
return (
2828
<thead
2929
ref={ref}
30-
className="[&_th]:p-3 [&_th]:bg-gray-100 [&_th]:font-semibold dark:[&_th]:bg-gray-800 [&_th:first-child]:rounded-tl-md [&_th:last-child]:rounded-tr-md"
30+
className="[&_th]:py-2 [&_th]:px-4 [&_th]:bg-gray-100 [&_th]:font-semibold dark:[&_th]:bg-gray-800 [&_th:first-child]:rounded-tl-md [&_th:last-child]:rounded-tr-md"
3131
{...props}
3232
/>
3333
);
@@ -53,7 +53,11 @@ TableHead.displayName = "TableHead";
5353
export const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
5454
({ className, ...props }, ref) => {
5555
return (
56-
<tbody ref={ref} className="[&_td]:p-3 [&_td:last-child]:text-right [&_tr]:hover:bg-muted/5" {...props} />
56+
<tbody
57+
ref={ref}
58+
className="[&_td]:py-3 [&_td]:px-4 [&_td:last-child]:text-right [&_tr]:hover:bg-muted/5"
59+
{...props}
60+
/>
5761
);
5862
},
5963
);

0 commit comments

Comments
 (0)