From 86b75a1a980118e875ba27a118f5f74ff344ad57 Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Thu, 21 Jan 2021 12:01:25 -0500 Subject: [PATCH] Rename reactTableProps to ItemTableCellProps --- src/components/ItemTable/ItemTable.js | 2 +- .../LastUpdatedCell/LastUpdatedCell.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/ItemTable/ItemTable.js b/src/components/ItemTable/ItemTable.js index 6df2fdd..f05fc5f 100644 --- a/src/components/ItemTable/ItemTable.js +++ b/src/components/ItemTable/ItemTable.js @@ -153,7 +153,7 @@ export default function ItemTable({ data }) { return ( ); default: diff --git a/src/components/LastUpdatedCell/LastUpdatedCell.js b/src/components/LastUpdatedCell/LastUpdatedCell.js index 9bce6b4..6fbbc81 100644 --- a/src/components/LastUpdatedCell/LastUpdatedCell.js +++ b/src/components/LastUpdatedCell/LastUpdatedCell.js @@ -39,32 +39,32 @@ const timeToBackgroundColor = (time) => { return backgroundColor; } -export default function LastUpdatedCell({ time, reactTableCellProps }) { +export default function LastUpdatedCell({ time, ItemTableCellProps }) { // Insert the calculated background color into props so it isn't overriden. // Inspired by: https://github.com/mui-org/material-ui/issues/19479 - reactTableCellProps = { - ...reactTableCellProps, + ItemTableCellProps = { + ...ItemTableCellProps, style: { - ...reactTableCellProps.style, + ...ItemTableCellProps.style, backgroundColor: timeToBackgroundColor(time) } }; return ( - + ); }; LastUpdatedCell.propTypes = { - /** Time value in ISO8601. */ + /** ISO 8601 formatted time string. */ "time": PropTypes.string, - /** Props passed from ItemTable. */ - "reactTableProps": PropTypes.object, + /** Props to be applied to the ItemTableCell. */ + "ItemTableCellProps": PropTypes.object, }; LastUpdatedCell.defaultProps = { "time": "", - "reactTableProps": {}, + "ItemTableCellProps": {}, }; \ No newline at end of file