{handlePos.map((pos, idx) => {
const handleStyle: Style =
orientation === 'vertical'
? { top: `${pos}%`, position: 'absolute' }
: { left: `${pos}%`, position: 'absolute' };
return (
);
})}
{handlePos.map((_node, idx, arr) => {
if (idx === 0 && arr.length > 1) {
return null;
}
return (
);
})}
{PitComponent &&
pitPoints.map((n) => {
const pos = getPosition(n, min, max);
const pitStyle: Style =
orientation === 'vertical'
? { top: `${pos}%`, position: 'absolute' }
: { left: `${pos}%`, position: 'absolute' };
return (
{n}
);
})}
{children}
);
}
}
export default Rheostat;