@@ -3,7 +3,6 @@ import styled from "styled-components"
33import ReactSelect , { components as defaultComponents } from "react-select"
44import Creatable from "react-select/creatable"
55import { Icon } from "@/components/icon"
6- import { TextSmall } from "@/components/typography"
76
87const useDataAttrs = ( props , name ) => {
98 const { "data-ga" : dataGA , "data-testid" : dataTestId } = props . selectProps
@@ -109,8 +108,12 @@ const makeCustomTheme = theme => selectTheme => {
109108
110109const getOptionColor = ( theme , state ) => {
111110 if ( state . isDisabled ) return theme . colors . placeholder
112- if ( state . isSelected ) return theme . colors . text
113- return theme . colors . textDescription
111+ return theme . colors . text
112+ }
113+
114+ const getOptionBackground = ( theme , state ) => {
115+ if ( state . isSelected ) return theme . colors . menuItemSelected
116+ return null
114117}
115118
116119const makeCustomStyles = ( theme , { minWidth, size, ...providedStyles } = { } ) => ( {
@@ -169,6 +172,7 @@ const makeCustomStyles = (theme, { minWidth, size, ...providedStyles } = {}) =>
169172 display : "flex" ,
170173 alignItems : "center" ,
171174 color : getOptionColor ( theme , state ) ,
175+ backgroundColor : getOptionBackground ( theme , state ) ,
172176 ":hover" : {
173177 backgroundColor : theme . colors . secondaryHighlight ,
174178 color : theme . colors . text ,
0 commit comments