Skip to content

Commit

Permalink
feat(devtools): update react query logo to close devtools
Browse files Browse the repository at this point in the history
added button wrapper on react query logo which onClick closes devtools window

closes TanStack#3067
  • Loading branch information
himankpathak committed May 3, 2022
1 parent 07c9ce0 commit 2d3a3b5
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/devtools/devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ export function ReactQueryDevtools({
{isResolvedOpen ? (
<Button
type="button"
aria-label="Close React Query Devtools"
aria-controls="ReactQueryDevtoolsPanel"
aria-haspopup="true"
aria-expanded="true"
Expand Down Expand Up @@ -540,12 +539,24 @@ export const ReactQueryDevtoolsPanel = React.forwardRef<
alignItems: 'center',
}}
>
<Logo
aria-hidden
<button
type="button"
aria-label="Close React Query Devtools"
aria-controls="ReactQueryDevtoolsPanel"
aria-haspopup="true"
aria-expanded="true"
onClick={() => setIsOpen(false)}
style={{
display: 'inline-flex',
background: 'none',
border: 0,
padding: 0,
marginRight: '.5em',
cursor: 'pointer',
}}
/>
>
<Logo aria-hidden />
</button>
<div
style={{
display: 'flex',
Expand Down Expand Up @@ -605,6 +616,7 @@ export const ReactQueryDevtoolsPanel = React.forwardRef<
style={{
flex: '1',
marginRight: '.5em',
width: '100%',
}}
/>
{!filter ? (
Expand Down

0 comments on commit 2d3a3b5

Please sign in to comment.