MCPcopy Index your code
hub / github.com/adobe/react-spectrum / getPercentValue

Function getPercentValue

packages/react-stately/src/slider/useSliderState.ts:366–369  ·  view source on GitHub ↗
(percent: number)

Source from the content-addressed store, hash-verified

364 }
365
366 function getPercentValue(percent: number) {
367 const val = percent * (maxValue - minValue) + minValue;
368 return clamp(getRoundedValue(val), minValue, maxValue);
369 }
370
371 function incrementThumb(index: number, stepSize: number = 1) {
372 let s = Math.max(stepSize, step);

Callers 1

setThumbPercentFunction · 0.85

Calls 2

clampFunction · 0.90
getRoundedValueFunction · 0.85

Tested by

no test coverage detected