davidhu2000 / react-spinners

A collection of loading spinner components for react
https://www.davidhu.io/react-spinners
MIT License
3k stars 260 forks source link

HashLoader color is taken from the last HashLoader component #581

Open Legend999 opened 3 months ago

Legend999 commented 3 months ago

Package Version 0.13.8

Describe the bug HashLoader color is taken from the last HashLoader component. If we have 2 HashLoaders with different assigned colors, they will have the color of the last one.

In the following case, both loaders will be green:

<HashLoader color="red" />
<HashLoader color="green" />

To Reproduce https://codesandbox.io/p/devbox/lucid-tom-vql768-forked-zcnzjh

Expected behavior The first loader should be red and the second one should be green.

Screenshots image

davidhu2000 commented 6 days ago

had to revert this change since it breaks SSR + jest snapshots. Will need to think about how to do this better. maybe including the color as part of the animation name make sense, something deterministic