@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
9 lines (7 loc) • 317 B
JavaScript
function getChangeValue({ value, containerWidth, min, max, step }) {
const left = Math.min(Math.max(value, 0), containerWidth);
const dx = left / containerWidth * (max - min);
return (dx !== 0 ? Math.round(dx / step) * step : 0) + min;
}
export { getChangeValue };
//# sourceMappingURL=get-change-value.js.map