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

Function setValue

packages/react-stately/src/color/useColorWheelState.ts:144–147  ·  view source on GitHub ↗
(value: Color)

Source from the content-addressed store, hash-verified

142 }, [stateValue]);
143 let valueRef = useRef(value);
144 let setValue = (value: Color) => {
145 valueRef.current = value;
146 setValueState(value);
147 };
148
149 let channelRange = value.getChannelRange('hue');
150 let {minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep} = channelRange;

Callers 1

setHueFunction · 0.70

Calls 1

normalizeColorFunction · 0.90

Tested by

no test coverage detected