From 3c5eb653fd01097eaaefeb77ba505b8331ae975b Mon Sep 17 00:00:00 2001 From: katspaugh Date: Wed, 21 Apr 2021 09:21:44 +0200 Subject: [PATCH] Fix key props; update tests --- .../FixedIcon/fixedIcon.stories.tsx | 4 +- src/dataDisplay/Table/index.tsx | 21 +- tests/__snapshots__/storybook.test.js.snap | 810 +++++++++++------- 3 files changed, 535 insertions(+), 300 deletions(-) diff --git a/src/dataDisplay/FixedIcon/fixedIcon.stories.tsx b/src/dataDisplay/FixedIcon/fixedIcon.stories.tsx index f67b6e8c..4ecfe82f 100644 --- a/src/dataDisplay/FixedIcon/fixedIcon.stories.tsx +++ b/src/dataDisplay/FixedIcon/fixedIcon.stories.tsx @@ -75,8 +75,8 @@ export const IconsWhite = (): React.ReactElement => { return ( - {iconsWhite.map((iconsWhite) => ( - + {iconsWhite.map((iconsWhite, index) => ( + {iconsWhite} diff --git a/src/dataDisplay/Table/index.tsx b/src/dataDisplay/Table/index.tsx index 015a847f..ee07c97b 100644 --- a/src/dataDisplay/Table/index.tsx +++ b/src/dataDisplay/Table/index.tsx @@ -145,21 +145,18 @@ export const Table = ({ ); return ( - <> + onRowClick(row.id)}> - {rowCells.map((c, index) => { - return ( - - {c.content} - - ); - })} + {rowCells.map((c, index) => ( + + {c.content} + + ))} {/* Collapsible content */} @@ -177,7 +174,7 @@ export const Table = ({ )} - + ); })} diff --git a/tests/__snapshots__/storybook.test.js.snap b/tests/__snapshots__/storybook.test.js.snap index b33567d3..96dcc09a 100644 --- a/tests/__snapshots__/storybook.test.js.snap +++ b/tests/__snapshots__/storybook.test.js.snap @@ -38,7 +38,7 @@ exports[`Storyshots Data Display/Accordion Compact Accordion 1`] = ` className="MuiAccordionSummary-content" >
Some text
Some text
  • ,
    ,
    ,
    ,
    ,
    , @@ -6242,10 +6480,10 @@ Array [ exports[`Storyshots Inputs/Button Disabled Button 1`] = `
    ,