diff --git a/src/BaseInput.tsx b/src/BaseInput.tsx index 3364328..ae4ff4d 100644 --- a/src/BaseInput.tsx +++ b/src/BaseInput.tsx @@ -130,6 +130,7 @@ const BaseInput: FC = (props) => { if (hasAddon(props)) { const wrapperCls = `${prefixCls}-group`; const addonCls = `${wrapperCls}-addon`; + const groupWrapperCls = `${wrapperCls}-wrapper`; const mergedWrapperClassName = clsx( `${prefixCls}-wrapper`, @@ -139,7 +140,10 @@ const BaseInput: FC = (props) => { ); const mergedGroupClassName = clsx( - `${prefixCls}-group-wrapper`, + groupWrapperCls, + { + [`${groupWrapperCls}-disabled`]: disabled, + }, classes?.group, classNames?.groupWrapper, ); diff --git a/tests/BaseInput.test.tsx b/tests/BaseInput.test.tsx index 8ca45fd..55cc543 100644 --- a/tests/BaseInput.test.tsx +++ b/tests/BaseInput.test.tsx @@ -226,4 +226,14 @@ describe('BaseInput', () => { ?.style.color, ).toBe('blue'); }); + + it('with addon and disabled', () => { + const { container } = render( + + + , + ); + + expect(container.firstChild).toHaveClass('rc-input-group-wrapper-disabled'); + }); });