From c82ba736a663a2ab620e677415482a88374e1111 Mon Sep 17 00:00:00 2001 From: Marco Schumacher Date: Mon, 25 Apr 2022 22:48:02 +0200 Subject: [PATCH] fix: footer padding --- example/App.tsx | 4 ++++ example/app.module.css | 4 ++++ src/theme/defaultTheme/defaultClasses.ts | 4 +--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/example/App.tsx b/example/App.tsx index 599b822..d3f2790 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -168,6 +168,10 @@ function Content(): JSX.Element { header: 'Price', footer: (prices) => <>∑ {prices.reduce((sum, price) => sum + price, 0).toFixed(2)}€, renderCell: (price) => <>{price.toFixed(2)}€, + classes: { + cell: classes.right, + footerCell: classes.right, + }, }), ]} classes={{ diff --git a/example/app.module.css b/example/app.module.css index d5b56b6..ecfeab0 100644 --- a/example/app.module.css +++ b/example/app.module.css @@ -6,3 +6,7 @@ .table .odd { background: lightGray; } + +.right { + justify-content: end; +} diff --git a/src/theme/defaultTheme/defaultClasses.ts b/src/theme/defaultTheme/defaultClasses.ts index e6291f0..2c98f1a 100644 --- a/src/theme/defaultTheme/defaultClasses.ts +++ b/src/theme/defaultTheme/defaultClasses.ts @@ -30,14 +30,12 @@ export const defaultClasses = { headerCell: css(cell, { padding: `var(--spacing) 0 var(--spacing) calc(2 * var(--spacing))`, borderBottom: `1px solid #c9cfda`, - background: white, }), footerCell: css(cell, { - padding: `var(--spacing) 0 var(--spacing) calc(2 * var(--spacing))`, + padding: `var(--spacing) calc(2 * var(--spacing))`, borderTop: `1px solid #c9cfda`, borderBottom: 'none', - background: white, }), firstCell: css({