New: Move to CSS Variables for Colorings

This commit is contained in:
Qstick
2021-11-21 17:00:02 -06:00
parent 8d39d5c6bb
commit 2b58f3131e
90 changed files with 354 additions and 547 deletions
+4 -3
View File
@@ -2,15 +2,16 @@ import Chart from 'chart.js/auto';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { kinds } from 'Helpers/Props';
import colors from 'Styles/Variables/colors';
function getColors(kind) {
const style = getComputedStyle(document.body);
if (kind === kinds.WARNING) {
return colors.failedColors.reverse();
return style.getPropertyValue('--failedColors').split(',');
}
return colors.chartColors;
return style.getPropertyValue('--chartColors').split(',');
}
class BarChart extends Component {