- Theme provider update

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-22 15:30:43 -05:00
parent d7faf11e27
commit 9deab7d5d5
2 changed files with 16 additions and 14 deletions

View File

@@ -147,23 +147,11 @@
} }
} }
//Update row highlighting on production board.
.ant-table-tbody > tr.ant-table-row:hover > td {
background: #e7f3ff !important;
}
.ant-table-tbody > tr.ant-table-row-selected > td {
background: #e6f7ff !important;
}
.job-line-manual { .job-line-manual {
color: tomato; color: tomato;
font-style: italic; font-style: italic;
} }
td.ant-table-column-sort {
background-color: transparent;
}
.ant-table-tbody > tr.ant-table-row:nth-child(2n) > td { .ant-table-tbody > tr.ant-table-row:nth-child(2n) > td {
background-color: #f4f4f4; background-color: #f4f4f4;

View File

@@ -1,4 +1,9 @@
import {defaultsDeep} from "lodash"; import {defaultsDeep} from "lodash";
import {theme} from "antd";
const {defaultAlgorithm, darkAlgorithm} = theme;
let isDarkMode = false;
/** /**
* Default theme * Default theme
@@ -6,6 +11,11 @@ import {defaultsDeep} from "lodash";
*/ */
const defaultTheme = { const defaultTheme = {
components: { components: {
Table: {
rowHoverBg: '#e7f3ff',
rowSelectedBg: '#e6f7ff',
headerSortHoverBg: 'transparent',
},
Menu: { Menu: {
darkItemHoverBg: '#1677ff', darkItemHoverBg: '#1677ff',
itemHoverBg: '#1677ff', itemHoverBg: '#1677ff',
@@ -40,7 +50,11 @@ const devTheme = {
*/ */
const prodTheme = {}; const prodTheme = {};
const theme = process.env.NODE_ENV === "development" ? devTheme const currentTheme = process.env.NODE_ENV === "development" ? devTheme
: prodTheme; : prodTheme;
export default defaultsDeep(theme, defaultTheme); const finaltheme = {
algorithm: isDarkMode ? darkAlgorithm : defaultAlgorithm,
...defaultsDeep(currentTheme, defaultTheme)
}
export default finaltheme;