UNPKG

@kennarddh/spinning-prize-wheel

Version:
37 lines (36 loc) 960 B
import { FactoryOrValue } from 'Types'; export interface IRarityGroups { [key: string]: { label: string; rarity: number; color?: string; }; } export declare type IChoice = { id: string; label: string; color?: string; rarityGroup: string; }; export declare type IChoices = IChoice[]; export interface IProps { rotateDuration: number; resetRotateDuration?: number; rarityGroups: IRarityGroups; choices: IChoices; withoutArrow?: boolean; fullRotationAddBeforeDestination?: FactoryOrValue<number>; counterClockwise?: boolean; onEndRotate?: ((id: string) => void) | undefined; onStartRotate?: ((id: string) => void) | undefined; onReset?: (() => void) | undefined; groupColorByRarity?: boolean; shuffleChoices?: boolean; size: number; fontSize?: number; needReset?: boolean; } export interface ILuckyWheel { Rotate: () => void; Reset: () => void; }