From f1655888efda635cbc6f1136b4d5146e8a16e6a9 Mon Sep 17 00:00:00 2001 From: AkaraChen Date: Wed, 27 Nov 2024 10:29:16 +0800 Subject: [PATCH] fix: number input component --- web/app/components/base/input-number/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/components/base/input-number/index.tsx b/web/app/components/base/input-number/index.tsx index e9792f48ef..b32cc4e0fb 100644 --- a/web/app/components/base/input-number/index.tsx +++ b/web/app/components/base/input-number/index.tsx @@ -12,7 +12,7 @@ export type InputNumberProps = { } & Omit export const InputNumber: FC = (props) => { - const { unit, className, onChange, amount = 1, value, size = 'sm', max, min, ...rest } = props + const { unit, className, onChange, amount = 1, value, size = 'md', max, min, ...rest } = props const update = (input: SetStateAction) => { const current = typeof input === 'function' ? input(value) : input as number if (max && current >= (max as number)) @@ -25,6 +25,8 @@ export const InputNumber: FC = (props) => { const dec = () => update(val => val - amount) return
= (props) => { }} /> {unit &&
{unit}
} -
+