MCPcopy Create free account
hub / github.com/adobe/react-spectrum / ColorWheel

Function ColorWheel

packages/react-aria/test/color/useColorWheel.test.tsx:45–67  ·  view source on GitHub ↗
(props: ColorWheelProps)

Source from the content-addressed store, hash-verified

43});
44
45function ColorWheel(props: ColorWheelProps) {
46 let state = useColorWheelState(props);
47 let inputRef = useRef(null);
48 let containerRef = useRef(null);
49
50 let {inputProps, trackProps, thumbProps} = useColorWheel(
51 {
52 ...props,
53 innerRadius: THUMB_RADIUS - 3,
54 outerRadius: THUMB_RADIUS + 3
55 },
56 state,
57 inputRef
58 );
59
60 return (
61 <div data-testid="container" {...trackProps} ref={containerRef}>
62 <div data-testid="thumb" {...thumbProps}>
63 <input {...inputProps} ref={inputRef} />
64 </div>
65 </div>
66 );
67}
68
69describe('useColorWheel', () => {
70 let onChangeSpy = jest.fn();

Callers

nothing calls this directly

Calls 2

useColorWheelStateFunction · 0.90
useColorWheelFunction · 0.90

Tested by

no test coverage detected