@@ -37,8 +37,6 @@ const getOptionVariant = (selectProps: Props, option: unknown): 'default' | 'dis
37
37
return 'default' ;
38
38
} ;
39
39
40
- const getColor = ( key : string , props : Props ) => String ( get ( key ) ( props ) ) ;
41
-
42
40
const customStyles : StylesConfig = {
43
41
container : ( provided , { selectProps } : WithSelectProps < Props > ) => {
44
42
const bSize = {
@@ -219,27 +217,27 @@ const customStyles: StylesConfig = {
219
217
borderColor : getSemanticValue ( 'border-disabled' ) ,
220
218
221
219
'> [role="button"]' : {
222
- color : getColor ( 'semanticColors.icon. disabled', selectProps )
220
+ color : getSemanticValue ( 'foreground- disabled')
223
221
}
224
222
} ;
225
223
case 'error' :
226
224
return {
227
225
...styles ,
228
- color : getColor ( 'semanticColors.text.dangerInverted' , selectProps ) ,
226
+ color : getSemanticValue ( 'foreground-danger-default' ) ,
229
227
backgroundColor : 'transparent' ,
230
- borderColor : getColor ( 'semanticColors. border.dangerEmphasized' , selectProps ) ,
228
+ borderColor : getSemanticValue ( ' border-danger-default' ) ,
231
229
232
230
'> [role="button"]' : {
233
- color : getColor ( 'semanticColors.icon. danger' , selectProps )
231
+ color : getSemanticValue ( 'foreground- danger-default' )
234
232
} ,
235
233
236
234
'&:hover' : {
237
- color : getColor ( 'semanticColors.text.primaryInverted' , selectProps ) ,
238
- backgroundColor : getColor ( 'semanticColors. background.dangerEmphasized' , selectProps ) ,
239
- borderColor : getColor ( 'semanticColors. border.dangerEmphasized' , selectProps ) ,
235
+ color : getSemanticValue ( 'foreground-on-background-danger' ) ,
236
+ backgroundColor : getSemanticValue ( ' background-surface-danger-emphasized' ) ,
237
+ borderColor : getSemanticValue ( ' border-danger-default' ) ,
240
238
241
239
'> [role="button"]' : {
242
- color : getColor ( 'semanticColors.icon.primaryInverted' , selectProps )
240
+ color : getSemanticValue ( 'foreground-on-background-danger' )
243
241
}
244
242
}
245
243
} ;
@@ -252,16 +250,16 @@ const customStyles: StylesConfig = {
252
250
borderColor : getSemanticValue ( 'border-info-default' ) ,
253
251
254
252
'> [role="button"]' : {
255
- color : getColor ( 'semanticColors.icon.action' , selectProps )
253
+ color : getSemanticValue ( 'foreground-info-default' )
256
254
} ,
257
255
258
256
'&:hover' : {
259
257
color : getSemanticValue ( 'foreground-on-background-primary' ) ,
260
258
backgroundColor : getSemanticValue ( 'background-element-info-emphasized' ) ,
261
- borderColor : getColor ( 'semanticColors. border.infoEmphasized' , selectProps ) ,
259
+ borderColor : getSemanticValue ( ' border-info-default' ) ,
262
260
263
261
'> [role="button"]' : {
264
- color : getColor ( 'semanticColors.icon.primaryInverted' , selectProps )
262
+ color : getSemanticValue ( 'foreground-on-background-info' )
265
263
}
266
264
}
267
265
} ;
0 commit comments