Skip to content

Commit 832a9f5

Browse files
author
Dylan Huang
committed
styling
1 parent 013991a commit 832a9f5

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

vite-app/src/components/PivotTable.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,11 @@ export function PivotTable<T extends Record<string, unknown>>({
133133
</TableHeader>
134134
))}
135135
{showRowTotals && (
136-
<TableHeader align="right" className="bg-gray-100">
137-
<div className="text-xs font-medium text-gray-700">Total</div>
136+
<TableHeader
137+
align="right"
138+
className="bg-gray-100 border-l-2 border-l-gray-300"
139+
>
140+
<div className="text-xs font-semibold text-gray-900">Total</div>
138141
</TableHeader>
139142
)}
140143
</tr>
@@ -177,9 +180,9 @@ export function PivotTable<T extends Record<string, unknown>>({
177180
align="right"
178181
nowrap
179182
medium
180-
className="bg-gray-100"
183+
className="bg-gray-100 border-l-2 border-l-gray-300"
181184
>
182-
<div className="font-semibold text-gray-900">
185+
<div className="text-xs font-semibold text-gray-900">
183186
{formatter(rowTotals[rKey] ?? 0)}
184187
</div>
185188
</TableCell>
@@ -188,14 +191,14 @@ export function PivotTable<T extends Record<string, unknown>>({
188191
);
189192
})}
190193
{showColumnTotals && (
191-
<TableRow gray className="border-t-2 border-gray-300">
194+
<TableRow gray>
192195
{/* Total label spanning row header columns */}
193196
<TableCell
194197
colSpan={Math.max(1, rowFields.length)}
195198
semibold
196-
className="bg-gray-100"
199+
className="bg-gray-100 border-t-2 border-gray-300"
197200
>
198-
<div className="text-sm font-semibold text-gray-900">Total</div>
201+
<div className="text-xs font-semibold text-gray-900">Total</div>
199202
</TableCell>
200203
{/* Column totals with enhanced styling */}
201204
{colKeyTuples.map((cTuple, cIdx) => {
@@ -206,9 +209,9 @@ export function PivotTable<T extends Record<string, unknown>>({
206209
align="right"
207210
nowrap
208211
medium
209-
className="bg-gray-100"
212+
className="bg-gray-100 border-t-2 border-gray-300"
210213
>
211-
<div className="font-semibold text-gray-900">
214+
<div className="text-xs font-semibold text-gray-900">
212215
{formatter(colTotals[cKey] ?? 0)}
213216
</div>
214217
</TableCell>
@@ -220,7 +223,7 @@ export function PivotTable<T extends Record<string, unknown>>({
220223
align="right"
221224
nowrap
222225
semibold
223-
className="bg-gray-200"
226+
className="bg-gray-200 border-t-0"
224227
>
225228
<div className="text-sm font-bold text-gray-900">
226229
{formatter(grandTotal)}

0 commit comments

Comments
 (0)