// DatePickerField.tsx import { FormControl, FormField, FormItem, FormLabel, FormMessage, Input, } from "@repo/shadcn-ui/components"; import { cn } from "@repo/shadcn-ui/lib/utils"; import { Control, FieldPath, FieldValues } from "react-hook-form"; import { useTranslation } from "../../locales/i18n.ts"; type NumberFieldProps = { control: Control; name: FieldPath; label: string; placeholder?: string; description?: string; disabled?: boolean; required?: boolean; readOnly?: boolean; className?: string; }; export function NumberField({ control, name, label, placeholder, description, disabled = false, required = false, readOnly = false, className, }: NumberFieldProps) { const { t } = useTranslation(); const isDisabled = disabled || readOnly; return ( (
{label} {required && {t("common.required")}}

{description || "\u00A0"}

)} /> ); }