Skip to content

Commit

Permalink
Fix coloring of dropdowns and layer heights
Browse files Browse the repository at this point in the history
  • Loading branch information
AarCon committed Oct 10, 2024
1 parent 867e90a commit 88bf865
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/components/Pokedex2/ModeSwitch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import * as React from 'react';
import { useGlobalState } from '../common/GlobalState';
import { FormControl, InputLabel, MenuItem, Select } from '@mui/material';
import { GAMEDATA2, GAMEDATA3, GAMEDATAV } from '../../../__gamedata';
import { useColorMode } from '@docusaurus/theme-common';

const ModeSwitch = () => {
const { colorMode, setColorMode } = useColorMode();
const [globalState, updateMode] = useGlobalState();

const handleChange = (event) => {
Expand All @@ -15,7 +17,7 @@ const ModeSwitch = () => {
marginLeft: {xs: "unset", sm: ".25rem"},
gridArea: "c",
minWidth: "fit-content",
backgroundColor: "var(--mui-palette-common-background)"
backgroundColor: colorMode === "dark" ? "var(--ifm-background-color)" : "white",
}}
>
<InputLabel id='version-selector-label'>Version</InputLabel>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pokedex2/PokemonPageContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const PokemonPageContent = ({ pokemon, pokemonNames, pokemon3, pokemonNam
sx={{
position: "sticky",
top: "75px",
zIndex: 999,
zIndex: 2,
}}
>
<Box
Expand Down
6 changes: 3 additions & 3 deletions src/components/Pokedex2/PokemonSearchBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Autocomplete, TextField } from '@mui/material';
import { useHistory } from '@docusaurus/router';
import { usePluginData } from '@docusaurus/useGlobalData';
import useBaseUrl from '@docusaurus/useBaseUrl';
import { useGlobalState } from '../common/GlobalState';
import { useColorMode } from '@docusaurus/theme-common';

export const PokemonSearchBox = ({ pokemonNames, formNo, monsNo }) => {
const [globalState, updateMode] = useGlobalState();
const { colorMode, setColorMode } = useColorMode();
const history = useHistory();
const { path } = usePluginData('luminescent-pokedex-data-plugin');
const pokedexPath = useBaseUrl(path);
Expand All @@ -28,7 +28,7 @@ export const PokemonSearchBox = ({ pokemonNames, formNo, monsNo }) => {
sx={{
width: {xs: "250px", sm: "300px"},
gridArea: "a",
backgroundColor: "var(--mui-palette-common-background)"
backgroundColor: colorMode === "dark" ? "var(--ifm-background-color)" : "white",
}}
options={options}
value={pokemonName}
Expand Down

0 comments on commit 88bf865

Please sign in to comment.