/** @jsx h */ import { h } from 'preact'; import { cx } from '@algolia/ui-components-shared'; import type { PitProps } from './Rheostat'; const Pit = ({ style, children }: PitProps) => { // first, end & middle const positionValue = Math.round(parseFloat(style.left as string)); const shouldDisplayValue = [0, 50, 100].includes(positionValue); const value = children as string; const pitValue = Math.round(parseInt(value, 10) * 100) / 100; return (