feat: added repo card hide border option (#488)

* 🚀 Prettier config

* 🚀 hide_border for Repo Card

* fix: wrong total commits (#490)

* chore: run prettier on all files

* chore: lol lets add the trailing commas

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
This commit is contained in:
Bas950
2020-09-24 21:38:14 +05:30
committed by GitHub
co-authored by Anurag Hazra
parent 3c6c142c75
commit 8aea1e3c35
35 changed files with 152 additions and 134 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ const retryer = async (fetcher, variables, retries = 0) => {
let response = await fetcher(
variables,
process.env[`PAT_${retries + 1}`],
retries
retries,
);
// prettier-ignore
+5 -5
View File
@@ -37,7 +37,7 @@ function kFormatter(num) {
function isValidHexColor(hexColor) {
return new RegExp(
/^([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4})$/
/^([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4})$/,
).test(hexColor);
}
@@ -124,19 +124,19 @@ function getCardColors({
// finally if both colors are invalid fallback to default theme
const titleColor = fallbackColor(
title_color || selectedTheme.title_color,
"#" + defaultTheme.title_color
"#" + defaultTheme.title_color,
);
const iconColor = fallbackColor(
icon_color || selectedTheme.icon_color,
"#" + defaultTheme.icon_color
"#" + defaultTheme.icon_color,
);
const textColor = fallbackColor(
text_color || selectedTheme.text_color,
"#" + defaultTheme.text_color
"#" + defaultTheme.text_color,
);
const bgColor = fallbackColor(
bg_color || selectedTheme.bg_color,
"#" + defaultTheme.bg_color
"#" + defaultTheme.bg_color,
);
return { titleColor, iconColor, textColor, bgColor };