Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cbd0e58

Browse files
authored
Merge pull request anuraghazra#48 from anuraghazra/fix-circl-rank-rim
design: added a rim to circle rank's progress
2 parents 014f710 + 6f79b49 commit cbd0e58

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/renderStatsCard.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
8383
const statItems = Object.keys(STATS)
8484
.filter((key) => !hide.includes(key))
8585
.map((key, index) =>
86-
// create the text nodes, and pass index so that we can calculate the line spacing
86+
// create the text nodes, and pass index so that we can calculate the line spacing
8787
createTextNode({ ...STATS[key], index, lineHeight: lheight })
8888
);
8989

@@ -113,6 +113,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
113113
: `<g data-testid="rank-circle" transform="translate(400, ${
114114
height / 1.85
115115
})">
116+
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
116117
<circle class="rank-circle" cx="-10" cy="8" r="40" />
117118
<text
118119
x="0"
@@ -139,6 +140,12 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
139140
fill: ${iconColor};
140141
display: ${!!show_icons ? "block" : "none"};
141142
}
143+
.rank-circle-rim {
144+
stroke: ${titleColor};
145+
fill: none;
146+
stroke-width: 6;
147+
opacity: 0.2;
148+
}
142149
.rank-circle {
143150
stroke-dashoffset: 30;
144151
stroke-dasharray: ${rankProgress};

0 commit comments

Comments
 (0)