From 2843d2ddb88a859f208cb849e8d6b50994fc16fa Mon Sep 17 00:00:00 2001 From: wrigh393 Date: Fri, 16 Jul 2021 15:32:29 -0400 Subject: [PATCH 1/2] Changed default value of backgroundColor variable to "inherit" --- src/components/LastUpdatedCell/LastUpdatedCell.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LastUpdatedCell/LastUpdatedCell.js b/src/components/LastUpdatedCell/LastUpdatedCell.js index cae525c..3d32008 100644 --- a/src/components/LastUpdatedCell/LastUpdatedCell.js +++ b/src/components/LastUpdatedCell/LastUpdatedCell.js @@ -26,7 +26,7 @@ export default function LastUpdatedCell({ time, ItemTableCellProps }) { const week = day * 7; const month = week * 4; - let backgroundColor = theme.palette.background.paper; + let backgroundColor = "inherit"; // 1-6 days old if (timeDelta > day && timeDelta <= week) { From ae7bc7e86277fae91033298e15701418f8bd5a6b Mon Sep 17 00:00:00 2001 From: wrigh393 Date: Fri, 16 Jul 2021 16:28:12 -0400 Subject: [PATCH 2/2] Added child selector to hover styles --- src/components/ItemTable/ItemTable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ItemTable/ItemTable.js b/src/components/ItemTable/ItemTable.js index 399afb7..6c6de62 100644 --- a/src/components/ItemTable/ItemTable.js +++ b/src/components/ItemTable/ItemTable.js @@ -23,7 +23,7 @@ export default function ItemTable({ data, rowCanBeSelected, loading }) { width: "100%" }, hoverBackgroundColor: { - "&:hover": { + "&:hover > *": { // The !important is placed here to enforce CSS specificity. // See: https://material-ui.com/styles/advanced/#css-injection-order backgroundColor: `${theme.palette.primary[200]} !important`, @@ -42,7 +42,7 @@ export default function ItemTable({ data, rowCanBeSelected, loading }) { // are a hotfix to force the table body to have height until a better solution is found. VirtualizedTableStyles: { height: '82vh !important', - display:"table-row" + display: "table-row" }, tableMargin: { marginTop: theme.spacing(2) @@ -68,7 +68,7 @@ export default function ItemTable({ data, rowCanBeSelected, loading }) { { Header: 'Last Updated', accessor: 'last_updated', sortInverted: true }, { Header: 'Department', accessor: 'department' }, { Header: 'Building', accessor: 'building' }, - { Header: 'Date Received', accessor: 'date_received', sortInverted: true , } + { Header: 'Date Received', accessor: 'date_received', sortInverted: true, } ], []); const tableInstance = useTable( {