"use client"; import { Label } from "@/components/ui/label"; type WellnessSliderProps = { id: string; label: string; value: number; min?: number; max?: number; step?: number; unit?: string; formatValue?: (value: number) => string; disabled?: boolean; onChange: (value: number) => void; }; export function WellnessSlider({ id, label, value, min = 1, max = 5, step = 1, unit, formatValue, disabled = false, onChange, }: WellnessSliderProps) { const displayValue = formatValue ? formatValue(value) : `${value}${unit ?? ""}`; return (
{displayValue}
onChange(Number(event.target.value))} className={ disabled ? "w-full cursor-not-allowed accent-muted-foreground opacity-50 grayscale" : "w-full accent-primary" } />
); }