Skip to content

Commit

Permalink
fix stories
Browse files Browse the repository at this point in the history
  • Loading branch information
veej committed Aug 26, 2024
1 parent 0252e6f commit 59e8528
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions packages/bento-design-system/stories/Components/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ const exampleColumnsWithFooter = [
hint: { onPress: action("hint") },
footer: ({ rows }) =>
Intl.NumberFormat("en").format(
rows.reduce((acc, row) => acc + (row.values.applications ?? 0), 0)
rows.reduce(
(acc, row) =>
acc +
(typeof row.values.applications === "number"
? row.values.applications ?? 0
: row.values.applications?.numericValue ?? 0),
0
)
),
}),
tableColumn.numberWithIcon({
Expand Down Expand Up @@ -193,7 +200,14 @@ const exampleGroupedColumns = [
hint: { onPress: action("hint") },
footer: ({ rows }) =>
Intl.NumberFormat("en").format(
rows.reduce((acc, row) => acc + (row.values.applications ?? 0), 0)
rows.reduce(
(acc, row) =>
acc +
(typeof row.values.applications === "number"
? row.values.applications ?? 0
: row.values.applications?.numericValue ?? 0),
0
)
),
}),
tableColumn.numberWithIcon({
Expand Down

0 comments on commit 59e8528

Please sign in to comment.