-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animated Circular Progress Bar - Tailwind colors #401
Comments
<AnimatedCircularProgressBar
max={100}
min={0}
value={value}
gaugePrimaryColor="rgb(79 70 229)"
gaugeSecondaryColor="rgba(0, 0, 0, 0.1)"
/> How are you thinking of using classnames here, as we need to pass two colors for the two gauges? |
Could we not have a class sent to the class of the svg sections, like stroke-ring (ring being a color class in tailwind) So gaugePrimaryColorClassName, gaugeSecondaryColorClassName? |
@JasonColeyNZ So, you want to create a global variable using that name and then use it? Is that what you mean? |
If the AnimatedCircularProgressBar had two properties, like gaugePrimaryColorClassName and gaugeSecondaryColorClassName as well as the gaugePrimaryColor, then I could pass a standard tailwind classname, stroke-[whatever] and then i can easily use tailwind colors without having to resort to using tailwindConfig/resolveConfig to get the colors.
Anyway, its easy enough for me to implement, just thought it could be an option in your version? |
But since Tailwind’s default color palette can be restrictive, what if someone wants to use a specific hex color code? Will this change support hex codes as well? I believe you need to pass stroke-[#color]. Feel free to open a PR, and we’ll review it! |
tailwind allows arbitrary colors, |
Does it make sense that the Animated Circular Progress Bar allows the use of tailwind in the color selection?
Maybe allow className for both the gauge colors?
At present we need to access the tailwind config to get these colors, not that friendly?
The text was updated successfully, but these errors were encountered: