repo card: adjust label offset

This commit is contained in:
martin-mfg
2025-05-22 15:21:08 +02:00
parent 954607c15d
commit 5cf5a7572e
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -83,7 +83,7 @@ const renderRepoCard = (repo, options = {}) => {
show_icons = true,
number_format = "short",
text_bold,
line_height = 10,
line_height = 22,
username,
theme = "default_repocard",
border_radius,
@@ -159,6 +159,7 @@ const renderRepoCard = (repo, options = {}) => {
bold: text_bold,
number_format,
link: STATS[key].link,
labelXOffset: 20,
}),
);
+2 -1
View File
@@ -48,12 +48,13 @@ const createTextNode = ({
bold,
number_format,
link,
labelXOffset=25,
}) => {
const kValue =
number_format.toLowerCase() === "long" ? value : kFormatter(value);
const staggerDelay = (index + 3) * 150;
const labelOffset = showIcons ? `x="25"` : "";
const labelOffset = showIcons ? `x="${labelXOffset}"` : "";
const iconSvg = showIcons
? `
<svg data-testid="icon" class="icon" viewBox="0 0 16 16" version="1.1" width="16" height="16">