How to add gradient colors like it was in prior versions?
djaffer opened this issue · comments
Danish J. commented
I have a simple question on how to add a gradient that was there before?
colors={[['#004777', 0.33], ['#F7B801', 0.33], ['#A30000']]}
It would be nice to have smooth migration guidelines.
Vasil Dimitrov commented
Danish J. commented
Is this the same as the one above. I am just trying to have example equivalent the example you had in past as it is easier to than really link them.
Vasil Dimitrov commented
Yup, it was easier but it was not really used much so I decided to remove it from the bundle so other users do not pay the price of having it in the bundle every time. You can use the one below to get the same gradient as before:
<svg>
<defs>
<linearGradient id="countdown-circle-timer-gradient" x1="1" y1="0" x2="0" y2="0">
<stop offset="0" stop-color="#004777" />>
<stop offset="0.33" stop-color="#004777"/>
<stop offset="0.66" stop-color="#F7B801"/>
<stop offset="1" stop-color="#A30000" />
</linearGradient>
</defs>
</svg>
<CountdownCircleTimer colors="url(#countdown-circle-timer-gradient)">
{({ remainingTime }) => remainingTime}
</CountdownCircleTimer>
Danish J. commented
Thank you @vydimitrov