import classNames from "classnames"; import React from "react"; import { float, NumericRange, slugify, toFriendlyDecimal } from "./util"; export type NumericSliderProps = NumericRange & { id?: string; label: string; onChange: (value: number) => void; value: number; valueSuffix?: string; disabled?: boolean; }; export const NumericSlider: React.FC = (props) => { const id = props.id || slugify(props.label); return (
props.onChange(float(e.target.value))} /> {" "} {toFriendlyDecimal(props.value)} {props.valueSuffix}
); };