Skip to content

Commit 59ba412

Browse files
Brian Vaughnkoto
Brian Vaughn
authored andcommitted
Fixed primitive hook badge colors for light theme (facebook#21034)
1 parent b8765f8 commit 59ba412

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
}
7272

7373
.PrimitiveHookNumber {
74-
color: var(--color-component-badge-count-inverted);
75-
background-color: var(--color-component-badge-background-inverted);
74+
background-color: var(--color-primitive-hook-badge-background);
75+
color: var(--color-primitive-hook-badge-text);
7676
font-size: var(--font-size-monospace-small);
7777
margin-right: 0.25rem;
7878
border-radius: 0.125rem;

packages/react-devtools-shared/src/devtools/views/Settings/SettingsContext.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ export function updateThemeVariables(
383383
updateStyleHelper(theme, 'color-expand-collapse-toggle', documentElements);
384384
updateStyleHelper(theme, 'color-link', documentElements);
385385
updateStyleHelper(theme, 'color-modal-background', documentElements);
386+
updateStyleHelper(
387+
theme,
388+
'color-primitive-hook-badge-background',
389+
documentElements,
390+
);
391+
updateStyleHelper(theme, 'color-primitive-hook-badge-text', documentElements);
386392
updateStyleHelper(theme, 'color-record-active', documentElements);
387393
updateStyleHelper(theme, 'color-record-hover', documentElements);
388394
updateStyleHelper(theme, 'color-record-inactive', documentElements);

packages/react-devtools-shared/src/devtools/views/root.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
--light-color-expand-collapse-toggle: #777d88;
7070
--light-color-link: #0000ff;
7171
--light-color-modal-background: rgba(255, 255, 255, 0.75);
72+
--light-color-primitive-hook-badge-background: #e5e5e5;
73+
--light-color-primitive-hook-badge-text: #5f6673;
7274
--light-color-record-active: #fc3a4b;
7375
--light-color-record-hover: #3578e5;
7476
--light-color-record-inactive: #0088fa;
@@ -156,6 +158,8 @@
156158
--dark-color-expand-collapse-toggle: #8f949d;
157159
--dark-color-link: #61dafb;
158160
--dark-color-modal-background: rgba(0, 0, 0, 0.75);
161+
--dark-color-primitive-hook-badge-background: rgba(0, 0, 0, 0.25);
162+
--dark-color-primitive-hook-badge-text: rgba(255, 255, 255, 0.7);
159163
--dark-color-record-active: #fc3a4b;
160164
--dark-color-record-hover: #a2e9fc;
161165
--dark-color-record-inactive: #61dafb;

0 commit comments

Comments
 (0)