@@ -52,6 +52,9 @@ const HiddenInput = ({ value, name }: { value: string; name?: string }): React.R
52
52
const iconVerticalMargin = {
53
53
medium : sizeTokens [ 14 ] ,
54
54
large : sizeTokens [ 24 ] ,
55
+ noLabel : sizeTokens [ 0 ] ,
56
+ noLabelM : sizeTokens [ 20 ] ,
57
+ noLabelL : sizeTokens [ 28 ] ,
55
58
} as const ;
56
59
const LEFT_LABEL_WIDTH = 132 ;
57
60
@@ -179,16 +182,24 @@ const _DatePickerInput = (
179
182
{ ...referenceProps }
180
183
/>
181
184
</ BaseBox >
182
- < BaseBox flexShrink = { 0 } alignSelf = "start " >
185
+ < BaseBox flexShrink = { 0 } alignSelf = "center " >
183
186
< ArrowRightIcon
184
187
size = "medium"
188
+ // marginTop={
189
+ // // Hacky layouting because the we cannot put this inside the internal layout of BaseInput.
190
+ // hasLabel && (!isLabelPositionLeft || isMobile)
191
+ // ? `calc(${makeSize(iconVerticalMargin[size])} + ${makeSize(
192
+ // isLarge ? sizeTokens[20] : sizeTokens[15],
193
+ // )})`
194
+ // : makeSize(iconVerticalMargin[size])
195
+ // }
185
196
marginTop = {
186
- // Hacky layouting because the we cannot put this inside the internal layout of BaseInput.
187
- hasLabel && ( ! isLabelPositionLeft || isMobile )
188
- ? `calc( ${ makeSize ( iconVerticalMargin [ size ] ) } + ${ makeSize (
189
- isLarge ? sizeTokens [ 20 ] : sizeTokens [ 15 ] ,
190
- ) } )`
191
- : makeSize ( iconVerticalMargin [ size ] )
197
+ // Label present ? add label height : remove label height; align basebox to center
198
+ hasLabel
199
+ ? isLarge
200
+ ? makeSize ( iconVerticalMargin [ 'noLabelL' ] )
201
+ : makeSize ( iconVerticalMargin [ 'noLabelM' ] )
202
+ : makeSize ( iconVerticalMargin [ 'noLabel' ] )
192
203
}
193
204
/>
194
205
</ BaseBox >
0 commit comments