Merged in release/2023-06-02 (pull request #830)

IO-2281 Added striped table colors
This commit is contained in:
Patrick Fic
2023-06-01 22:33:44 +00:00
2 changed files with 20 additions and 2 deletions

View File

@@ -156,3 +156,11 @@
td.ant-table-column-sort {
background-color: transparent;
}
.ant-table-tbody > tr.ant-table-row:nth-child(2n) > td {
background-color: #f4f4f4;
}
.rowWithColor > td {
background-color: var(--bgColor) !important;
}

View File

@@ -246,11 +246,21 @@ export function ProductionListTable({
(x) => x.status === record.status
);
if (!color) return null;
if (!color) {
if (index % 2 === 0)
return {
style: {
backgroundColor: `rgb(236, 236, 236)`,
},
};
return null;
}
return {
className: "rowWithColor",
style: {
backgroundColor: `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`,
"--bgColor": `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`,
},
};
},