From 2e245c4d7215fe1a30c0c133ec2cfa65b7711ca3 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Fri, 15 Dec 2023 11:22:49 +0800 Subject: [PATCH] refactor: better classNames logic (#612) --- src/InputNumber.tsx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/InputNumber.tsx b/src/InputNumber.tsx index 0886c130..b8c0b2ac 100644 --- a/src/InputNumber.tsx +++ b/src/InputNumber.tsx @@ -17,6 +17,7 @@ import { getDecupleSteps } from './utils/numberUtil'; import { InputFocusOptions, triggerFocus } from 'rc-input/lib/utils/commonUtils'; import useFrame from './hooks/useFrame'; +import { BaseInputProps } from 'rc-input/lib/interface'; export type { ValueType }; @@ -67,15 +68,7 @@ export interface InputNumberProps suffix?: React.ReactNode; addonBefore?: React.ReactNode; addonAfter?: React.ReactNode; - classes?: { - affixWrapper?: string; - group?: string; - wrapper?: string; - }; - classNames?: { - affixWrapper?: string; - group?: string; - wrapper?: string; + classNames?: BaseInputProps['classNames'] & { input?: string; }; @@ -583,7 +576,7 @@ const InternalInputNumber = React.forwardRef( // ============================ Render ============================ return (