Skip to content

Commit 707b3fc

Browse files
authored
[DevTools] Make Toggle hover state more visible (#32914)
This change adds a background color to Toggles to make them easier to see. This is especially important when DevTools are not in focus, and it's harder to see. Test plan: 1. `yarn build:chrome:local` 2. Inspect components 3. Hover over "Select an Element in page to inspect it" 4. Observe background change
1 parent 7ff4d05 commit 707b3fc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: packages/react-devtools-shared/src/devtools/constants.js

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const THEME_STYLES: {[style: Theme | DisplayDensity]: any, ...} = {
2727
'--color-background-selected': '#0088fa',
2828
'--color-button-background': '#ffffff',
2929
'--color-button-background-focus': '#ededed',
30+
'--color-button-background-hover': 'rgba(0, 0, 0, 0.2)',
3031
'--color-button': '#5f6673',
3132
'--color-button-disabled': '#cfd1d5',
3233
'--color-button-active': '#0088fa',
@@ -174,6 +175,7 @@ export const THEME_STYLES: {[style: Theme | DisplayDensity]: any, ...} = {
174175
'--color-background-selected': '#178fb9',
175176
'--color-button-background': '#282c34',
176177
'--color-button-background-focus': '#3d424a',
178+
'--color-button-background-hover': 'rgba(255, 255, 255, 0.2)',
177179
'--color-button': '#afb3b9',
178180
'--color-button-active': '#61dafb',
179181
'--color-button-disabled': '#4f5766',

Diff for: packages/react-devtools-shared/src/devtools/views/Toggle.css

+7
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@
2020
background: var(--color-button-background);
2121
color: var(--color-button);
2222
}
23+
2324
.ToggleOff:hover {
2425
color: var(--color-button-hover);
2526
}
2627

28+
.ToggleOn:hover,
29+
.ToggleOff:hover {
30+
background-color: var(--color-button-background-hover);
31+
}
32+
33+
2734
.ToggleOn,
2835
.ToggleOn:active {
2936
color: var(--color-button-active);

0 commit comments

Comments
 (0)