'use client' import { FieldWrapper } from './shared' export type RangeProps = Omit, 'name'> & { name: string label?: string error?: string className?: string info?: string description?: string showValue?: boolean textSize?: 'sm' | 'md' } export default function Range(props: RangeProps) { const { name, label, error, className, info, description, showValue = true, textSize = 'sm', ...inputProps } = props const { min = 0, max = 100, step = 1, value, defaultValue, onChange, ...restInputProps } = inputProps const displayValue = value ?? defaultValue ?? 0 return (
{showValue && ( {displayValue} )}
) }