@@ -93,14 +93,26 @@ const defaultStyles = ({ menuWidth, size }) => ({
9393 isDisabled,
9494 isFocused,
9595 isSelected,
96- } ) => ( {
96+ } ) => {
97+ const getBackgroundColor = ( ) => {
98+ if ( isDisabled ) return systemColors . SYNTH_ALERT_BG_NEUTRAL ;
99+ if ( isSelected || isFocused ) return systemColors . SYNTH_HOVER_STATE ;
100+ return styles . backgroundColor ;
101+ } ;
102+
103+ const getHoverBackgroundColor = ( ) => {
104+ if ( isDisabled ) return systemColors . SYNTH_ALERT_BG_NEUTRAL ;
105+ if ( isSelected ) return systemColors . SYNTH_SELECTED_STATE_GREEN ;
106+ return systemColors . SYNTH_HOVER_STATE ;
107+ } ;
108+
109+ return {
97110 ...styles ,
98- backgroundColor : isSelected || isFocused ?
99- systemColors . SYNTH_HOVER_STATE : styles . backgroundColor ,
100- color : systemColors . UX_GRAY_900 ,
111+ backgroundColor : getBackgroundColor ( ) ,
112+ color : isDisabled ? systemColors . SYNTH_UNSELECTED_NEUTRAL : systemColors . UX_GRAY_900 ,
101113 fontWeight : fontWeights . light ,
102114 fontSize : '0.875rem' ,
103- cursor : 'pointer' ,
115+ cursor : isDisabled ? 'default' : 'pointer' ,
104116
105117 ':active' : {
106118 ...styles [ ':active' ] ,
@@ -110,10 +122,10 @@ const defaultStyles = ({ menuWidth, size }) => ({
110122
111123 ':hover' : {
112124 ...styles [ ':hover' ] ,
113- backgroundColor : isSelected ?
114- systemColors . SYNTH_SELECTED_STATE_GREEN : systemColors . SYNTH_HOVER_STATE ,
125+ backgroundColor : getHoverBackgroundColor ( ) ,
115126 } ,
116- } ) ,
127+ } ;
128+ } ,
117129} ) ;
118130
119131const borderedMultiValueStyles = ( borderedMultiValue ) => borderedMultiValue ? {
0 commit comments