Skip to content

Commit

Permalink
fix styles of secondary editor buttons (#2911)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheyenbrock authored Nov 15, 2022
1 parent 16174a0 commit 118db40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-weeks-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'graphiql': patch
---

Fix styles of secondary editor buttons
6 changes: 4 additions & 2 deletions packages/graphiql/src/components/GraphiQL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ export function GraphiQLInterface(props: GraphiQLInterfaceProps) {
<UnStyledButton
type="button"
className={
activeSecondaryEditor === 'variables'
activeSecondaryEditor === 'variables' &&
editorToolsResize.hiddenElement !== 'second'
? 'active'
: ''
}
Expand All @@ -530,7 +531,8 @@ export function GraphiQLInterface(props: GraphiQLInterfaceProps) {
<UnStyledButton
type="button"
className={
activeSecondaryEditor === 'headers'
activeSecondaryEditor === 'headers' &&
editorToolsResize.hiddenElement !== 'second'
? 'active'
: ''
}
Expand Down
3 changes: 1 addition & 2 deletions packages/graphiql/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,11 @@ button.graphiql-tab-add > svg {
width: 0;
}

/* Generic icon style */
.graphiql-container .graphiql-chevron-icon {
color: hsla(var(--color-neutral), var(--alpha-tertiary));
display: block;
height: var(--px-12);
padding: var(--px-12);
margin: var(--px-12);
width: var(--px-12);
}

Expand Down

0 comments on commit 118db40

Please sign in to comment.