1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
const UserSelectStyle = {
option: (provided, state) => {
const { isDisabled, isFocused } = state;
return ({
...provided,
cursor: isDisabled ? 'default' : 'pointer',
backgroundColor: isFocused ? '#f5f5f5' : '#fff',
});
},
control: (provided) => ({
...provided,
fontSize: '14px',
cursor: 'pointer',
lineHeight: '1.5',
}),
indicatorSeparator: () => ({
display: 'none',
}),
dropdownIndicator: () => ({
display: 'none',
}),
clearIndicator: () => ({
display: 'none',
}),
// multi select style
multiValue: (provided) => {
return {
...provided,
display: 'inline-flex',
alignItems: 'center',
background: '#eaeaea',
borderRadius: '10px',
margin: '0 10px 0 0',
padding: '0 0 0 2px',
};
},
multiValueLabel: (provided) => {
return {
...provided,
padding: '0px',
};
},
multiValueRemove: (provided) => {
return {
...provided,
color: '#666',
':hover': {
backgroundColor: 'transparent',
color: '#555555',
}
};
},
// single select style
singleValue: (provided) => {
return {
...provided,
};
},
};
|