"use client"; interface RadiusSliderProps { value: number; onChange: (value: number) => void; } export function RadiusSlider({ value, onChange }: RadiusSliderProps) { const pct = (value / 2000) * 100; return (
onChange(Number(e.target.value))} style={{ background: value === 0 ? "var(--border)" : `linear-gradient(to right, #10b981 0%, #10b981 ${pct}%, var(--border) ${pct}%, var(--border) 100%)`, }} className=" flex-1 h-[3px] cursor-pointer appearance-none rounded-full outline-none [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:shadow [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-border [&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:h-3 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-border " /> {value === 0 ? "—" : `${value}m`}

0 = tidak tampilkan lingkaran

); }