Skip to content

Commit e548574

Browse files
authored
fix execute button becomes unstyled if there are several queries present (#4037)
1 parent 8335433 commit e548574

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

.changeset/poor-ads-argue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphiql/react': patch
3+
---
4+
5+
fix execute button becomes unstyled if there are several queries present

packages/graphiql-react/src/components/button/index.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
.graphiql-un-styled,
2-
button.graphiql-un-styled {
1+
.graphiql-un-styled {
32
all: unset;
43
border-radius: var(--border-radius-4);
54
cursor: pointer;

packages/graphiql-react/src/components/execute-button/index.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.graphiql-execute-button-wrapper {
2-
position: relative;
3-
}
4-
51
button.graphiql-execute-button {
62
background-color: hsl(var(--color-primary));
73
border: none;

packages/graphiql-react/src/components/execute-button/index.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,7 @@ export const ExecuteButton: FC = () => {
6363
</DropdownMenu>
6464
) : (
6565
<Tooltip label={label}>
66-
<button
67-
{...buttonProps}
68-
onClick={() => {
69-
if (isRunning) {
70-
stop();
71-
} else {
72-
run();
73-
}
74-
}}
75-
/>
66+
<button {...buttonProps} onClick={isRunning ? stop : run} />
7667
</Tooltip>
7768
);
7869
};

0 commit comments

Comments
 (0)