import classNames from 'classnames' import { VerticalThreeLine } from 'components/common/Icons' import { LeverageSliderType } from 'components/common/LeverageSlider' import { formatValue } from 'utils/formatters' interface Props { value: number marginThreshold?: number max: number type: LeverageSliderType min: number } const THUMB_WIDTH = 33 function InputOverlay({ max, value, marginThreshold, type, min }: Props) { const thumbPosPercent = max === 0 ? 0 : 100 / ((max - min) / (value - min)) const thumbPadRight = (thumbPosPercent / 100) * THUMB_WIDTH const markPosPercent = 100 / (max / (marginThreshold ?? 1)) const markPadRight = (markPosPercent / 100) * THUMB_WIDTH const hasPastMarginThreshold = marginThreshold ? value >= marginThreshold : undefined console.log(max, value) return ( <>