This commit is contained in:
Manav Rathi 2024-09-11 12:19:45 +05:30
parent 71d77a62fd
commit 1d239d409f
No known key found for this signature in database

View File

@ -65,7 +65,7 @@ import {
} from "react-select";
import AsyncSelect from "react-select/async";
import { getAutoCompleteSuggestions } from "services/searchService";
import { Collection } from "types/collection";
import { type Collection } from "types/collection";
interface SearchBarProps {
isInSearchMode: boolean;
@ -285,8 +285,7 @@ const SearchInputWrapper = styled(Box)`
const useSelectStyles = ({
colors,
}: Theme): StylesConfig<SearchOption, false> => {
return {
}: Theme): StylesConfig<SearchOption, false> => ({
container: (style) => ({ ...style, flex: 1 }),
control: (style, { isFocused }) => ({
...style,
@ -313,7 +312,7 @@ const useSelectStyles = ({
cursor: "pointer",
},
"& .main": {
backgroundColor: isFocused && "#202020",
backgroundColor: isFocused && colors.background.elevated2,
},
"&:last-child .MuiDivider-root": {
display: "none",
@ -328,8 +327,7 @@ const useSelectStyles = ({
dropdownIndicator: (style) => ({ ...style, display: "none" }),
indicatorSeparator: (style) => ({ ...style, display: "none" }),
clearIndicator: (style) => ({ ...style, display: "none" }),
};
};
});
const Control = ({ children, ...props }: ControlProps<SearchOption, false>) => (
<SelectComponents.Control {...props}>