Skip to content

Commit 25f2c73

Browse files
feat: added a footer component
1 parent f90c04a commit 25f2c73

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ jobs:
6666

6767
- name: Commit and Push
6868
run: |
69-
git config user.name "GitHub Actions"
70-
git config user.email [email protected]
71-
git add .
72-
git commit -m "chore: updated build"
73-
git push origin HEAD --force
69+
if [ $(git status . --porcelain=v1 2>/dev/null | wc -l) != "0" ] ; then
70+
git config user.name "GitHub Actions"
71+
git config user.email [email protected]
72+
git add .
73+
git commit -m "chore: updated build"
74+
git push origin HEAD --force
75+
fi

src/DataTable/DataTable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
120120
direction = defaultProps.direction,
121121
onColumnOrderChange = defaultProps.onColumnOrderChange,
122122
keepExpandableFirst = defaultProps.keepExpandableFirst,
123+
footer = defaultProps.footer,
123124
} = props;
124125

125126
const {
@@ -564,6 +565,7 @@ function DataTable<T>(props: TableProps<T>): JSX.Element {
564565
</Body>
565566
)}
566567
</Table>
568+
{footer && <div>{footer}</div>}
567569
</Wrapper>
568570
</ResponsiveWrapper>
569571

src/DataTable/defaultProps.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,5 @@ export const defaultProps = {
107107
onSort: noop,
108108
onColumnOrderChange: noop,
109109
keepExpandableFirst: false,
110+
footer: null,
110111
};

src/DataTable/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export type TableProps<T> = {
117117
* Shows and displays a header with a title
118118
* */
119119
title?: string | React.ReactNode;
120+
footer?: React.ReactNode;
120121
};
121122

122123
export type TableColumnBase = {

0 commit comments

Comments
 (0)