2023-09-18 02:01:30 +00:00
|
|
|
const MenuSelectStyle = {
|
|
|
|
option: (provided, state) => {
|
|
|
|
const { isDisabled, isSelected, isFocused } = state;
|
|
|
|
return ({
|
|
|
|
...provided,
|
|
|
|
cursor: isDisabled ? 'default' : 'pointer',
|
|
|
|
backgroundColor: isSelected ? '#20a0ff' : (isFocused ? '#f5f5f5' : '#fff'),
|
|
|
|
'.header-icon .dtable-font': {
|
|
|
|
color: isSelected ? '#fff' : '#aaa',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
control: (provided) => ({
|
|
|
|
...provided,
|
|
|
|
fontSize: '14px',
|
|
|
|
cursor: 'pointer',
|
|
|
|
lineHeight: '1.5',
|
|
|
|
}),
|
2024-07-18 03:58:42 +00:00
|
|
|
menuPortal: base => ({ ...base, zIndex: 9999 }),
|
2023-09-18 02:01:30 +00:00
|
|
|
indicatorSeparator: () => {},
|
|
|
|
};
|
|
|
|
|
|
|
|
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',
|
|
|
|
}),
|
2024-07-10 03:29:10 +00:00
|
|
|
// 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,
|
|
|
|
display: 'inline-flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
background: '#eaeaea',
|
|
|
|
borderRadius: '10px',
|
|
|
|
margin: '0',
|
|
|
|
padding: '0 2px',
|
|
|
|
width: 'fit-content',
|
|
|
|
};
|
|
|
|
},
|
2023-09-18 02:01:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export { MenuSelectStyle, UserSelectStyle };
|