Skip to content

Commit

Permalink
Minor formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wrigh393 committed Feb 1, 2021
1 parent 0df01d7 commit 86b3395
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/ItemTable/ItemTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { ArrowDownward, ArrowUpward } from "@material-ui/icons";


export default function ItemTable({ data, rowCanBeSelected }) {
const [selectedRow, setSelectedRow] = useState({ queue: null, number: null});
const [selectedRow, setSelectedRow] = useState({ queue: null, number: null });

const theme = useTheme();
const theme = useTheme();
const useStyles = makeStyles({
// Fully visible for active icons
activeSortIcon: {
Expand All @@ -22,10 +22,10 @@ export default function ItemTable({ data, rowCanBeSelected }) {
opacity: 0.2,
},
hoverBackgroundColor: {
"&.MuiTableRow-root.MuiTableRow-hover:hover":{
"&.MuiTableRow-root.MuiTableRow-hover:hover": {
backgroundColor: theme.palette.primary[200],
},

},
},
rowSelected: {
backgroundColor: theme.palette.type === 'light' ? theme.palette.primary[100] : theme.palette.primary[600],
Expand Down Expand Up @@ -140,11 +140,11 @@ export default function ItemTable({ data, rowCanBeSelected }) {
// This functionality should be achieved by using the selected prop and
// overriding the selected class but this applied the secondary color at 0.08% opacity.
// Overridding the root class is a workaround.
classes={{ root: (isSelected && rowCanBeSelected) ? classes.rowSelected : classes.bandedRows , hover: classes.hoverBackgroundColor}}
classes={{ root: (isSelected && rowCanBeSelected) ? classes.rowSelected : classes.bandedRows, hover: classes.hoverBackgroundColor }}

{...row.getRowProps()} >
{row.cells.map(cell => (
<TableCell
<TableCell
classes={{ root: classes.columnBorders }}
{...cell.getCellProps()}
>
Expand Down

0 comments on commit 86b3395

Please sign in to comment.