DEV Community

Discussion on: React: How to create a custom progress bar component in 5 minutes

Collapse
 
ramonak profile image
Katsiaryna (Kate) Lupachova

Glad that this blog post helped you!

To change a color of a bar dynamically just pass it as a prop or use it as a state variable. To be more specific could you please provide a code snippet where you have this problem?

Collapse
 
karem1986 profile image
Karem • Edited

Thank you Katsiaryna:) I fixed it by passiing in the div the 'background' property set to item.color (using these as props:)