Update numeric input increment value and enhance localization strings

This commit is contained in:
2025-12-04 02:11:46 +00:00
parent 6b9d8cdf49
commit 9e268cbc1b
4 changed files with 14 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ import { Minus, Plus, X } from "lucide-react"
import { Button } from "./button"
import { Input } from "./input"
import { cn } from "../../lib/utils"
import { useTranslation } from "react-i18next"
interface NumericInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {
value: string | number
@@ -50,6 +51,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
className,
...props
}, ref) => {
const { t } = useTranslation()
const [, setShowError] = React.useState(false)
const [, setShowWarning] = React.useState(false)
const [touched, setTouched] = React.useState(false)
@@ -220,6 +222,7 @@ const FormNumericInput = React.forwardRef<HTMLInputElement, NumericInputProps>(
)}
onClick={() => onChange('')}
tabIndex={-1}
title={ t('buttonClear') }
>
<X className="h-4 w-4" />
</Button>