import React from "react";

interface ControlSliderProps {
  label: string;
  name: string;
  value: number;
  min: number;
  max: number;
  step: number;
  onChange: (value: string) => void;
}

export const ControlSlider: React.FC<ControlSliderProps> = ({
  label,
  name,
  value,
  min,
  max,
  step,
  onChange,
}) => {
  return (
    <div className="control-row">
      <label>{label}</label>
      <input
        type="range"
        name={name}
        min={min}
        max={max}
        value={value}
        onChange={(event) => onChange(event.target.value)}
        step={step}
      />
    </div>
  );
};
