🌜 Trying dark mode on the react-select

This commit is contained in:
2023-12-03 16:02:54 -05:00
parent 29e0772a10
commit 1ed6a622d4
2 changed files with 17 additions and 4 deletions

View File

@@ -366,7 +366,7 @@ pre {
// comicvine metadata // comicvine metadata
.comicvine-metadata { .comicvine-metadata {
background-color: #f2f1f9; background-color: #d6cc99;
padding: 0.8rem; padding: 0.8rem;
border-radius: 0.5rem; border-radius: 0.5rem;
} }
@@ -381,7 +381,8 @@ pre {
} }
.comicInfo-metadata { .comicInfo-metadata {
background-color: #f7ebdd; background-color: #d6cc99;
color: #000;
padding: 0.8rem; padding: 0.8rem;
border-radius: 0.5rem; border-radius: 0.5rem;
} }

View File

@@ -69,17 +69,29 @@ export const Menu = (props): ReactElement => {
break; break;
} }
}; };
const customStyles = {
option: (base, { data, isDisabled, isFocused, isSelected }) => {
return {
...base,
backgroundColor: isFocused ? "gray" : "black",
};
},
control: (base) => ({
...base,
backgroundColor: "black",
border: "1px solid #CCC",
}),
};
return ( return (
<Select <Select
className="basic-single"
classNamePrefix="select"
components={{ Placeholder }} components={{ Placeholder }}
placeholder={ placeholder={
<span> <span>
<i className="fa-solid fa-list"></i> Actions <i className="fa-solid fa-list"></i> Actions
</span> </span>
} }
styles={customStyles}
name="actions" name="actions"
isSearchable={false} isSearchable={false}
options={filteredActionOptions} options={filteredActionOptions}