@@ -35,42 +35,43 @@ const SelectTags: React.FC<SelectTagsProps> = ({ onSelect, initialValue, type })
3535 return (
3636 < div title = "When you type, hit enter to add item and start typing again to add another or select from the dropdown" >
3737 < CreatableSelect
38- isMulti
39- options = { options }
40- value = { selectedLabels } // Make it a controlled component
41- onChange = { ( selected ) => {
42- handleInputChange ( selected || [ ] ) ;
43- } }
44- styles = { {
45- control : ( baseStyles , state ) => ( {
46- ...baseStyles ,
47- borderColor : state . isFocused ? 'grey' : 'white' ,
48- backgroundColor : 'black' ,
49- color : 'white' ,
50- } ) ,
51- option : ( baseStyles , { isFocused, isSelected } ) => ( {
52- ...baseStyles ,
53- backgroundColor : isSelected ? 'darkblue' : isFocused ? 'darkgray' : 'black' ,
54- color : 'white' ,
55- } ) ,
56- multiValue : ( baseStyles ) => ( {
57- ...baseStyles ,
58- backgroundColor : 'darkblue' ,
59- } ) ,
60- multiValueLabel : ( baseStyles ) => ( {
61- ...baseStyles ,
62- color : 'white' ,
63- } ) ,
64- input : ( baseStyles ) => ( {
65- ...baseStyles ,
66- color : 'white' ,
67- } ) ,
68- menu : ( baseStyles ) => ( {
69- ...baseStyles ,
70- backgroundColor : 'black' ,
71- } ) ,
72- } }
73- />
38+ isMulti
39+ options = { options }
40+ value = { selectedLabels }
41+ onChange = { ( selected ) => {
42+ handleInputChange ( selected || [ ] ) ;
43+ } }
44+ styles = { {
45+ control : ( baseStyles , state ) => ( {
46+ ...baseStyles ,
47+ borderColor : state . isFocused ? '#007bff' : '#ced4da' ,
48+ backgroundColor : 'white' ,
49+ color : 'black' ,
50+ } ) ,
51+ option : ( baseStyles , { isFocused, isSelected } ) => ( {
52+ ...baseStyles ,
53+ backgroundColor : isSelected ? '#007bff' : isFocused ? '#f8f9fa' : 'white' ,
54+ color : isSelected ? 'white' : 'black' ,
55+ } ) ,
56+ multiValue : ( baseStyles ) => ( {
57+ ...baseStyles ,
58+ backgroundColor : '#e9ecef' ,
59+ } ) ,
60+ multiValueLabel : ( baseStyles ) => ( {
61+ ...baseStyles ,
62+ color : 'black' ,
63+ } ) ,
64+ input : ( baseStyles ) => ( {
65+ ...baseStyles ,
66+ color : 'black' ,
67+ } ) ,
68+ menu : ( baseStyles ) => ( {
69+ ...baseStyles ,
70+ backgroundColor : 'white' ,
71+ boxShadow : '0 2px 4px rgba(0,0,0,0.1)' ,
72+ } ) ,
73+ } }
74+ />
7475 </ div >
7576 ) ;
7677} ;
0 commit comments