CrazyTim / spin-wheel

An easy to use, themeable component for randomising choices and prizes.
https://crazytim.github.io/spin-wheel/examples/themes
MIT License
174 stars 45 forks source link

Not accepting linear gradient background color #30

Open prafullkumarBhendwade opened 6 months ago

prafullkumarBhendwade commented 6 months ago

I was trying to update linear gradient bg color to itemBackgroundColors prop , not accepting the bg color as linear gradient See more below screen shots Screenshot 2024-03-04 at 5 43 32 PM

Screenshot 2024-03-04 at 5 44 18 PM

CrazyTim commented 5 months ago

Hi @prafullkumarBhendwade,

Currently the color can only be a CSS color.

Because this library uses the Canvas API, it would need to be done via JavaScript and with a CanvasGradient.

The best way to acheive this might be to hook into the Wheel.drawItemBackgrounds method. I'm not sure if this is something I want to support, but for now I'll consider this a request for enhancement 😄.

prafullkumarBhendwade commented 5 months ago

Thanks for your replay