'use client'; import type { CSSProperties } from 'react'; /** * Claymorphism slider — for numeric, isolated, non-critical inputs * (MD run length, search hit count, bootstrap cutoff, etc.). */ interface ClaySliderProps { label?: string; value: number; min: number; max: number; step?: number; unit?: string; onChange: (value: number) => void; disabled?: boolean; className?: string; } export function ClaySlider({ label, value, min, max, step = 1, unit, onChange, disabled, className = '', }: ClaySliderProps) { const pct = ((value - min) / (max - min)) * 100; return (
{label && {label}} {value} {unit ? ` ${unit}` : ''}
onChange(Number(e.target.value))} className="clay-slider w-full" style={{ '--fill': `${pct}%` } as CSSProperties} />
); }