Skip to content

Commit

Permalink
Customize react-query devtools styles
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Jun 21, 2024
1 parent 188293e commit ad87040
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const MyLayout = (props: any) => (
"& .RaHeader-toolbar > *": {
flexBasis: "33.33%",
// FIXME: This should be fixed in ra-navigation
alignItems: "center",
// alignItems: "center",
justifyContent: "center",
},
"& .RaHeader-toolbar > *:first-of-type": {
Expand All @@ -49,7 +49,11 @@ const MyLayout = (props: any) => (
},
}}
/>
<ReactQueryDevtools initialIsOpen={false} />
<ReactQueryDevtools
initialIsOpen={false}
// To avoid collision with the ConnectionWatcher notifications
buttonPosition="bottom-left"
/>
<ConnectionWatcher />
</>
);
Expand Down
9 changes: 9 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
body {
margin: 0;
}

/*
Because the style prop no longer exist in TanStack Query v5,
we have to use this rule to customize ReactQueryDevtools button size:
*/
.tsqd-transitions-container>div {
height: 30px;
width: 30px;
}

0 comments on commit ad87040

Please sign in to comment.