fix: stats hide_border bug (#151)

* fix: stats hide border bug

* fix white border on dark mode issue

* chore: refactor code & tests

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
This commit is contained in:
Liam
2020-07-24 03:37:09 -04:00
committed by GitHub
parent 7a8510641c
commit 9624cf6acd
2 changed files with 11 additions and 4 deletions

View File

@ -130,9 +130,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
? ""
: `<text x="25" y="35" class="header">${name}'${apostrophe} GitHub Stats</text>`;
const border = hide_border
? ""
: `
const border = `
<rect
data-testid="card-bg"
x="0.5"
@ -142,6 +140,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
rx="4.5"
fill="${bgColor}"
stroke="#E4E2E2"
stroke-opacity="${hide_border ? 0 : 1}"
/>
`;