feat: allow users to pass ring_color param (#2075)

* fix: prevent crash if undefined color is passed to func fallbackColor

* feat: allow users to pass ring_color param

Before this commit, the ring color was always equal to the title color.
This commit allows the user to pass a ring_color property to allow him
to style the ring color the way he pleases to. If no ring_color is
passed we default to the title color.

* docs: improves ring color documentation

* fix: improve code style

Co-authored-by: rickstaa <rick.staa@outlook.com>
This commit is contained in:
Pranav Joglekar
2022-11-19 20:18:42 +01:00
committed by GitHub
co-authored by rickstaa
parent 0c829e9488
commit 9aa39dfe81
9 changed files with 114 additions and 8 deletions
+3 -2
View File
@@ -77,6 +77,7 @@ const getStyles = ({
titleColor,
textColor,
iconColor,
ringColor,
show_icons,
progress,
}) => {
@@ -105,13 +106,13 @@ const getStyles = ({
}
.rank-circle-rim {
stroke: ${titleColor};
stroke: ${ringColor};
fill: none;
stroke-width: 6;
opacity: 0.2;
}
.rank-circle {
stroke: ${titleColor};
stroke: ${ringColor};
stroke-dasharray: 250;
fill: none;
stroke-width: 6;