react-custom-roulette icon indicating copy to clipboard operation
react-custom-roulette copied to clipboard

What is the way to add image in option?

Open sonykashyap opened this issue 2 years ago • 3 comments

image

sonykashyap avatar Jul 26 '22 09:07 sonykashyap

By using react-roulette-pro you can easily set images for your items.

IvanAdmaers avatar Aug 30 '22 00:08 IvanAdmaers

Hi @IvanAdmaers , Thanks! for suggesting react-roulette-pro. Is it possible to change to a wheel shape instead of a horizontal and vertical one?

sonykashyap avatar Oct 18 '22 14:10 sonykashyap

Hi, @sonykashyap. Unfortunately it's not possible at this moment.

Hi @IvanAdmaers , Thanks! for suggesting react-roulette-pro. Is it possible to change to a wheel shape instead of a horizontal and vertical one?

IvanAdmaers avatar Oct 18 '22 17:10 IvanAdmaers

@sonykashyap Thanks for your question! In version 1.3.2 we've added an image: ImageProps option in the WheelData interface (for each item of the data prop array). These are the available customization options:

interface ImageProps {
  uri: string;
  offsetX?: number; // Optional
  offsetY?: number; // Optional
  sizeMultiplier?: number; // Optional
  landscape?: boolean; // Optional
}

The documentation is also updated.

Let me know if you have any questions about it, or if you find any issues/improvements. Thank you!

luchozamora1 avatar Mar 13 '23 18:03 luchozamora1