Skip to content

Commit

Permalink
fix: input classname in affix wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
MadCcc committed Mar 11, 2022
1 parent 2e27c00 commit 5c5d273
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
Expand Up @@ -13790,7 +13790,7 @@ exports[`ConfigProvider components Input configProvider componentSize large 1`]
>
<input
action="click"
class="config-input"
class="config-input config-input-lg"
type="password"
value=""
/>
Expand Down
2 changes: 1 addition & 1 deletion components/input/Input.tsx
Expand Up @@ -223,7 +223,7 @@ const Input = forwardRef<InputRef, InputProps>((props, ref) => {
addonAfter={addonAfter && <NoFormStatus>{addonAfter}</NoFormStatus>}
addonBefore={addonBefore && <NoFormStatus>{addonBefore}</NoFormStatus>}
inputClassName={classNames(
!withPrefixSuffix && {
{
[`${prefixCls}-sm`]: mergedSize === 'small',
[`${prefixCls}-lg`]: mergedSize === 'large',
[`${prefixCls}-rtl`]: direction === 'rtl',
Expand Down
Expand Up @@ -6,7 +6,7 @@ exports[`Input.Password rtl render component should be rendered correctly in RTL
>
<input
action="click"
class="ant-input"
class="ant-input ant-input-rtl"
type="password"
value=""
/>
Expand Down Expand Up @@ -163,7 +163,7 @@ exports[`Input.Password should support size 1`] = `
>
<input
action="click"
class="ant-input"
class="ant-input ant-input-lg"
type="password"
value=""
/>
Expand Down
Expand Up @@ -5009,7 +5009,7 @@ exports[`renders ./components/input/demo/borderless-debug.md extend context corr
class="ant-input-affix-wrapper ant-input-affix-wrapper-borderless"
>
<input
class="ant-input"
class="ant-input ant-input-borderless"
placeholder="Unbordered"
type="text"
value=""
Expand Down Expand Up @@ -5053,7 +5053,7 @@ exports[`renders ./components/input/demo/borderless-debug.md extend context corr
</span>
<input
class="ant-input"
class="ant-input ant-input-borderless"
type="text"
value=""
/>
Expand All @@ -5072,7 +5072,7 @@ exports[`renders ./components/input/demo/borderless-debug.md extend context corr
</span>
<input
class="ant-input ant-input-disabled"
class="ant-input ant-input-disabled ant-input-borderless"
disabled=""
type="text"
value=""
Expand Down Expand Up @@ -9161,7 +9161,7 @@ exports[`renders ./components/input/demo/search-input.md extend context correctl
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg"
>
<input
class="ant-input"
class="ant-input ant-input-lg"
placeholder="input search text"
type="text"
value=""
Expand Down Expand Up @@ -9224,7 +9224,7 @@ exports[`renders ./components/input/demo/search-input.md extend context correctl
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg"
>
<input
class="ant-input"
class="ant-input ant-input-lg"
placeholder="input search text"
type="text"
value=""
Expand Down Expand Up @@ -9485,7 +9485,7 @@ Array [
</span>
</span>
<input
class="ant-input"
class="ant-input ant-input-lg"
placeholder="large size"
type="text"
value=""
Expand Down Expand Up @@ -9555,7 +9555,7 @@ Array [
</span>
</span>
<input
class="ant-input"
class="ant-input ant-input-sm"
placeholder="small size"
type="text"
value=""
Expand Down
14 changes: 7 additions & 7 deletions components/input/__tests__/__snapshots__/demo.test.js.snap
Expand Up @@ -1226,7 +1226,7 @@ exports[`renders ./components/input/demo/borderless-debug.md correctly 1`] = `
class="ant-input-affix-wrapper ant-input-affix-wrapper-borderless"
>
<input
class="ant-input"
class="ant-input ant-input-borderless"
placeholder="Unbordered"
type="text"
value=""
Expand Down Expand Up @@ -1270,7 +1270,7 @@ exports[`renders ./components/input/demo/borderless-debug.md correctly 1`] = `
</span>
<input
class="ant-input"
class="ant-input ant-input-borderless"
type="text"
value=""
/>
Expand All @@ -1289,7 +1289,7 @@ exports[`renders ./components/input/demo/borderless-debug.md correctly 1`] = `
</span>
<input
class="ant-input ant-input-disabled"
class="ant-input ant-input-disabled ant-input-borderless"
disabled=""
type="text"
value=""
Expand Down Expand Up @@ -2935,7 +2935,7 @@ exports[`renders ./components/input/demo/search-input.md correctly 1`] = `
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg"
>
<input
class="ant-input"
class="ant-input ant-input-lg"
placeholder="input search text"
type="text"
value=""
Expand Down Expand Up @@ -2998,7 +2998,7 @@ exports[`renders ./components/input/demo/search-input.md correctly 1`] = `
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg"
>
<input
class="ant-input"
class="ant-input ant-input-lg"
placeholder="input search text"
type="text"
value=""
Expand Down Expand Up @@ -3259,7 +3259,7 @@ Array [
</span>
</span>
<input
class="ant-input"
class="ant-input ant-input-lg"
placeholder="large size"
type="text"
value=""
Expand Down Expand Up @@ -3329,7 +3329,7 @@ Array [
</span>
</span>
<input
class="ant-input"
class="ant-input ant-input-sm"
placeholder="small size"
type="text"
value=""
Expand Down
4 changes: 0 additions & 4 deletions components/input/style/mixin.less
Expand Up @@ -7,10 +7,6 @@
.input-lg() {
padding: @input-padding-vertical-lg @input-padding-horizontal-lg;
font-size: @font-size-lg;

input {
font-size: @font-size-lg;
}
}

.input-sm() {
Expand Down

0 comments on commit 5c5d273

Please sign in to comment.