CrazyTim/spin-wheel

Not accepting linear gradient background color

Opened this issue · 2 comments

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

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 😄.

Thanks for your replay