Skip to content

Commit

Permalink
fix: footer padding
Browse files Browse the repository at this point in the history
  • Loading branch information
schummar committed Apr 25, 2022
1 parent 150f3b2 commit c82ba73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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={{
Expand Down
4 changes: 4 additions & 0 deletions example/app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
.table .odd {
background: lightGray;
}

.right {
justify-content: end;
}
4 changes: 1 addition & 3 deletions src/theme/defaultTheme/defaultClasses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit c82ba73

Please sign in to comment.