feat: added border_color option (#1000)
* feat: Allow customization of border color * docs: Update readme
This commit is contained in:
@@ -31,6 +31,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
show_owner,
|
||||
theme = "default_repocard",
|
||||
border_radius,
|
||||
border_color,
|
||||
locale,
|
||||
} = options;
|
||||
|
||||
@@ -60,11 +61,12 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
});
|
||||
|
||||
// returns theme based colors with proper overrides and defaults
|
||||
const { titleColor, textColor, iconColor, bgColor } = getCardColors({
|
||||
const { titleColor, textColor, iconColor, bgColor, borderColor } = getCardColors({
|
||||
title_color,
|
||||
icon_color,
|
||||
text_color,
|
||||
bg_color,
|
||||
border_color,
|
||||
theme,
|
||||
});
|
||||
|
||||
@@ -125,6 +127,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
textColor,
|
||||
iconColor,
|
||||
bgColor,
|
||||
borderColor,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
theme = "default",
|
||||
custom_title,
|
||||
border_radius,
|
||||
border_color,
|
||||
locale,
|
||||
disable_animations = false,
|
||||
} = options;
|
||||
@@ -77,11 +78,12 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
const lheight = parseInt(line_height, 10);
|
||||
|
||||
// returns theme based colors with proper overrides and defaults
|
||||
const { titleColor, textColor, iconColor, bgColor } = getCardColors({
|
||||
const { titleColor, textColor, iconColor, bgColor, borderColor } = getCardColors({
|
||||
title_color,
|
||||
icon_color,
|
||||
text_color,
|
||||
bg_color,
|
||||
border_color,
|
||||
theme,
|
||||
});
|
||||
|
||||
@@ -207,6 +209,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
textColor,
|
||||
iconColor,
|
||||
bgColor,
|
||||
borderColor,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -73,7 +73,8 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
layout,
|
||||
custom_title,
|
||||
locale,
|
||||
border_radius
|
||||
border_radius,
|
||||
border_color,
|
||||
} = options;
|
||||
|
||||
const i18n = new I18n({
|
||||
@@ -104,10 +105,11 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
}, 0);
|
||||
|
||||
// returns theme based colors with proper overrides and defaults
|
||||
const { titleColor, textColor, bgColor } = getCardColors({
|
||||
const { titleColor, textColor, bgColor, borderColor } = getCardColors({
|
||||
title_color,
|
||||
text_color,
|
||||
bg_color,
|
||||
border_color,
|
||||
theme,
|
||||
});
|
||||
|
||||
@@ -189,6 +191,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
titleColor,
|
||||
textColor,
|
||||
bgColor,
|
||||
borderColor,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -100,7 +100,8 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
locale,
|
||||
layout,
|
||||
langs_count = languages ? languages.length : 0,
|
||||
border_radius
|
||||
border_radius,
|
||||
border_color,
|
||||
} = options;
|
||||
|
||||
const i18n = new I18n({
|
||||
@@ -113,11 +114,18 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
langsCount = clampValue(parseInt(langs_count), 1, langs_count);
|
||||
|
||||
// returns theme based colors with proper overrides and defaults
|
||||
const { titleColor, textColor, iconColor, bgColor } = getCardColors({
|
||||
const {
|
||||
titleColor,
|
||||
textColor,
|
||||
iconColor,
|
||||
bgColor,
|
||||
borderColor,
|
||||
} = getCardColors({
|
||||
title_color,
|
||||
icon_color,
|
||||
text_color,
|
||||
bg_color,
|
||||
border_color,
|
||||
theme,
|
||||
});
|
||||
|
||||
@@ -221,6 +229,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
textColor,
|
||||
iconColor,
|
||||
bgColor,
|
||||
borderColor,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user