diff --git a/src/components/fortune-wheel/FortuneWheelView.tsx b/src/components/fortune-wheel/FortuneWheelView.tsx index 5a0f76c..c15b10d 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; @@ -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) => { @@ -239,7 +243,7 @@ export const FortuneWheelView: FC<{}> = () => ); }) } - +