@@ -36,10 +36,11 @@ const getRightExtraStyles = (
36
36
const getTopExtraStyles = (
37
37
affixPosition ?: POSITIONS ,
38
38
width ?: number ,
39
- isOutAffixPosition ?: boolean
39
+ isOutAffixPosition ?: boolean ,
40
+ inputWidth ?: number
40
41
) : CSSProp | undefined => {
41
42
if ( affixPosition === POSITIONS . LEFT && isOutAffixPosition ) {
42
- return labelInTopStyles ( width || 0 ) ;
43
+ return labelInTopStyles ( width || 0 , inputWidth || 0 ) ;
43
44
}
44
45
return undefined ;
45
46
} ;
@@ -77,7 +78,8 @@ export const getExtraStyles = (
77
78
affixPosition ?: POSITIONS ,
78
79
width ?: number ,
79
80
isOutAffixPosition ?: boolean ,
80
- helpTextPosition ?: InputHelpMessagePosition
81
+ helpTextPosition ?: InputHelpMessagePosition ,
82
+ inputWidth ?: number
81
83
) : CSSProp | undefined => {
82
84
if ( stylesPosition === POSITIONS . LEFT ) {
83
85
return getLeftExtraStyles ( affixPosition , isOutAffixPosition ) ;
@@ -86,7 +88,7 @@ export const getExtraStyles = (
86
88
return getRightExtraStyles ( affixPosition , isOutAffixPosition ) ;
87
89
}
88
90
if ( stylesPosition === POSITIONS . TOP ) {
89
- return getTopExtraStyles ( affixPosition , width , isOutAffixPosition ) ;
91
+ return getTopExtraStyles ( affixPosition , width , isOutAffixPosition , inputWidth ) ;
90
92
}
91
93
if ( stylesPosition === POSITIONS . BOTTOM ) {
92
94
return getBottomExtraStyles ( affixPosition , width , isOutAffixPosition , helpTextPosition ) ;
0 commit comments