diff --git a/src/components/fortune-wheel/FortuneWheelView.tsx b/src/components/fortune-wheel/FortuneWheelView.tsx index 5a0f76c..7b4d508 100644 --- a/src/components/fortune-wheel/FortuneWheelView.tsx +++ b/src/components/fortune-wheel/FortuneWheelView.tsx @@ -8,9 +8,13 @@ import { FortuneWheelSettingsView } from './FortuneWheelSettingsView'; import { WheelWinReveal } from './WheelWinReveal'; import { renderPrizeIcon } from './wheelPrizeIcon'; -// Stock UI palette (white / light-blue / grey / black). -const SLICE_COLORS = [ '#eef2f5', '#c3dcec' ]; -const RIM = '#4c606c'; +// Stock UI palette (white / light-blue / grey / black). Exposed as CSS custom +// properties so a runtime theme can recolor the wheel without changing defaults +// (the fallback values keep the stock look when no theme overrides them). +const SLICE_COLORS = [ 'var(--wheel-slice-1, #eef2f5)', 'var(--wheel-slice-2, #c3dcec)' ]; +const RIM = 'var(--wheel-rim, #4c606c)'; +const DIVIDER = 'var(--wheel-divider, rgba(76,96,108,0.3))'; +const HUB = 'var(--wheel-hub, #eef2f5)'; const WHEEL_SIZE = 420; const ICON_RADIUS = 150; const FULL_TURNS = 5; @@ -202,7 +206,7 @@ export const FortuneWheelView: FC<{}> = () => const canSpin = ((freeSpins + extraSpins) > 0) && !isSpinning && (prizes.length > 0); return ( - + setIsVisible(false) } />
@@ -223,7 +227,7 @@ export const FortuneWheelView: FC<{}> = () =>
+ style={ { width: '2px', height: `${ WHEEL_SIZE / 2 }px`, transform: `translateX(-1px) rotate(${ i * sliceAngle }deg)`, background: DIVIDER } } /> )) } { prizes.map((prize, i) => { @@ -233,13 +237,13 @@ export const FortuneWheelView: FC<{}> = () => key={ prize.id } className="absolute left-1/2 top-1/2" style={ { transform: `rotate(${ centerAngle }deg) translateY(-${ ICON_RADIUS }px) rotate(-${ centerAngle }deg)` } }> -
+
{ renderPrizeIcon(prize) }
); }) }
-
+
{ LocalizeText('wheel.free.today', [ 'count' ], [ freeSpins.toString() ]) }