validate langs card progress bar background color (#39)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// @ts-check
|
||||
|
||||
import { Card } from "../common/Card.js";
|
||||
import { getCardColors } from "../common/color.js";
|
||||
import { fallbackColor, getCardColors } from "../common/color.js";
|
||||
import { formatBytes } from "../common/fmt.js";
|
||||
import { I18n } from "../common/I18n.js";
|
||||
import { chunkArray, clampValue, lowercaseTrim } from "../common/ops.js";
|
||||
@@ -252,9 +252,7 @@ const createProgressTextNode = ({
|
||||
color,
|
||||
width: progressWidth,
|
||||
progress,
|
||||
progressBarBackgroundColor: progBarBgColor
|
||||
? `#${progBarBgColor}`
|
||||
: "#ddd",
|
||||
progressBarBackgroundColor: progBarBgColor,
|
||||
delay: staggerDelay + 300,
|
||||
})}
|
||||
</g>
|
||||
@@ -885,7 +883,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
langs,
|
||||
width,
|
||||
totalLanguageSize,
|
||||
prog_bar_bg_color,
|
||||
fallbackColor(prog_bar_bg_color, "#ddd"),
|
||||
stats_format,
|
||||
);
|
||||
}
|
||||
|
||||
+1
-1
@@ -142,4 +142,4 @@ const getCardColors = ({
|
||||
return { titleColor, iconColor, textColor, bgColor, borderColor, ringColor };
|
||||
};
|
||||
|
||||
export { isValidHexColor, isValidGradient, getCardColors };
|
||||
export { isValidHexColor, isValidGradient, getCardColors, fallbackColor };
|
||||
|
||||
Reference in New Issue
Block a user