Skip to content

Commit

Permalink
Make it possible to not set background color
Browse files Browse the repository at this point in the history
  • Loading branch information
moshthepitt committed Oct 14, 2019
1 parent 8a3ab59 commit 946aa8c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/helpers/indicators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,15 @@ export function getThresholdAdherenceIndicator(cell: CellInfo, configId: string)

/** Renders an indicator Cell based on cell.value and threshold configs
* @param {CellInfo} cell - the ReactTable.Cell being rendered in an indicator drilldown table
* @param {string} configId - the key vause used to get the custom reporting configs
* @param {IndicatorThresholds | null} thresholds - the indicator thresholds
* @returns {React.ReactElement} - the ReactTable.Cell element to be rendered for the indicator
*/
export function getIRSThresholdAdherenceIndicator(cell: CellInfo) {
export function getIRSThresholdAdherenceIndicator(
cell: CellInfo,
thresholds: IndicatorThresholds | null = indicatorThresholdsNA
) {
// determine if cell.value is a number
const isNumber = !Number.isNaN(Number(cell.value));
// get thresholds config from settings
const thresholds: IndicatorThresholds | null = indicatorThresholdsNA;
// determine cell background color
const cellColor = thresholds ? getThresholdColor(cell, thresholds) : WHITE;

Expand Down

0 comments on commit 946aa8c

Please sign in to comment.