@@ -18,6 +18,7 @@ import { CHECKBOX_VALUE } from '@Common/Types'
1818import { ComponentSizeType } from '@Shared/constants'
1919import { GroupBase , MultiValue , OptionsOrGroups , StylesConfig } from 'react-select'
2020import { SelectPickerOptionType , SelectPickerProps , SelectPickerVariantType } from './type'
21+ import { SELECT_PICKER_CONTROL_SIZE_MAP , SELECT_PICKER_FONT_SIZE_MAP , SELECT_PICKER_ICON_SIZE_MAP } from './constants'
2122
2223const getMenuWidthFromSize = < OptionValue , IsMulti extends boolean > (
2324 menuSize : SelectPickerProps < OptionValue , IsMulti > [ 'menuSize' ] ,
@@ -117,7 +118,7 @@ export const getCommonSelectStyle = <OptionValue, IsMulti extends boolean>({
117118 } ) ,
118119 control : ( base , state ) => ( {
119120 ...base ,
120- minHeight : size === ComponentSizeType . medium ? 'auto' : '36px' ,
121+ minHeight : SELECT_PICKER_CONTROL_SIZE_MAP [ size ] ,
121122 minWidth : '56px' ,
122123 boxShadow : 'none' ,
123124 backgroundColor : 'var(--N50)' ,
@@ -165,14 +166,22 @@ export const getCommonSelectStyle = <OptionValue, IsMulti extends boolean>({
165166 } ) ,
166167 dropdownIndicator : ( base , state ) => ( {
167168 ...base ,
169+ ...SELECT_PICKER_ICON_SIZE_MAP [ size ] ,
170+ display : 'flex' ,
171+ alignItems : 'center' ,
172+ flexShrink : '0' ,
168173 color : 'var(--N600)' ,
169174 padding : '0' ,
170175 transition : 'all .2s ease' ,
171176 transform : state . selectProps . menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)' ,
172177 } ) ,
173178 clearIndicator : ( base ) => ( {
174179 ...base ,
180+ ...SELECT_PICKER_ICON_SIZE_MAP [ size ] ,
175181 padding : 0 ,
182+ display : 'flex' ,
183+ alignItems : 'center' ,
184+ flexShrink : '0' ,
176185
177186 '&:hover' : {
178187 backgroundColor : 'transparent' ,
@@ -284,7 +293,7 @@ export const getCommonSelectStyle = <OptionValue, IsMulti extends boolean>({
284293 placeholder : ( base ) => ( {
285294 ...base ,
286295 color : 'var(--N500)' ,
287- fontSize : '13px' ,
296+ fontSize : SELECT_PICKER_FONT_SIZE_MAP [ size ] ,
288297 lineHeight : '20px' ,
289298 fontWeight : 400 ,
290299 margin : 0 ,
@@ -301,7 +310,7 @@ export const getCommonSelectStyle = <OptionValue, IsMulti extends boolean>({
301310 ...base ,
302311 margin : 0 ,
303312 color : 'var(--N900)' ,
304- fontSize : '13px' ,
313+ fontSize : SELECT_PICKER_FONT_SIZE_MAP [ size ] ,
305314 fontWeight : 400 ,
306315 lineHeight : '20px' ,
307316 ...( getVariantOverrides ( variant ) ?. singleValue ( base , state ) || { } ) ,
0 commit comments