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

Function getValuePercent

packages/react-stately/src/slider/useSliderState.ts:277–279  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

275 };
276
277 function getValuePercent(value: number) {
278 return (value - minValue) / (maxValue - minValue);
279 }
280
281 function getThumbMinValue(index: number) {
282 return index === 0 ? minValue : values[index - 1];

Callers 1

useSliderStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected