Skip to content

Commit 995ef1a

Browse files
committed
separate theme based styles
1 parent b101aed commit 995ef1a

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

packages/react-devtools-shared/src/devtools/views/Components/OwnersStack.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,11 @@
7373
background: var(--color-button-background-focus);
7474
}
7575

76-
.ModalDark[data-reach-menu-list], .ModalLight[data-reach-menu-list] {
76+
.Modal[data-reach-menu-list] {
7777
display: inline-flex;
7878
flex-direction: column;
79-
background-color: var(--light-color-background);
80-
color: var(--light-color-button);
8179
padding: 0.25rem 0;
8280
padding-right: 0;
83-
border: 1px solid var(--light-color-border);
8481
border-radius: 0.25rem;
8582
max-height: 10rem;
8683
overflow: auto;
@@ -93,10 +90,16 @@
9390
font-size: var(--font-size-monospace-normal);
9491
}
9592

96-
.ModalDark[data-reach-menu-list] {
93+
.ModalDark {
94+
background-color: var(--dark-color-background);
9795
border: 1px solid var(--dark-color-border);
9896
color: var(--dark-color-button);
99-
background-color: var(--dark-color-background);
97+
}
98+
99+
.ModalLight {
100+
background-color: var(--light-color-background);
101+
border: 1px solid var(--light-color-border);
102+
color: var(--light-color-button);
100103
}
101104

102105
.NotInStore,

packages/react-devtools-shared/src/devtools/views/Components/OwnersStack.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {StoreContext} from '../context';
3030
import type {SerializedElement} from './types';
3131

3232
import styles from './OwnersStack.css';
33-
import { SettingsContext } from '../Settings/SettingsContext';
33+
import {SettingsContext} from '../Settings/SettingsContext';
3434

3535
type SelectOwner = (owner: SerializedElement | null) => void;
3636

@@ -209,7 +209,7 @@ function ElementsDropdown({
209209
selectOwner,
210210
}: ElementsDropdownProps) {
211211
const store = useContext(StoreContext);
212-
const { theme, browserTheme } = useContext(SettingsContext);
212+
const {theme, browserTheme} = useContext(SettingsContext);
213213
const isLightTheme = (theme === 'auto' ? browserTheme : theme) === 'light';
214214

215215
const menuItems = [];
@@ -241,7 +241,10 @@ function ElementsDropdown({
241241
</span>
242242
</Tooltip>
243243
</MenuButton>
244-
<MenuList className={isLightTheme ? styles.ModalLight : styles.ModalDark}>
244+
<MenuList
245+
className={`${styles.Modal} ${
246+
isLightTheme ? styles.ModalLight : styles.ModalDark
247+
}`}>
245248
{menuItems}
246249
</MenuList>
247250
</Menu>

0 commit comments

Comments
 (0)