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

Function getValuePercent

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

Source from the content-addressed store, hash-verified

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

Callers 1

useSliderStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected