Should custom panel styles be overridden by defaults? #5940
Replies: 1 comment 8 replies
-
sounds like a bug. do you want to fix it? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We recently made a change to our app that caused the right side of the devtools panel to be covered by another element. My plan was to just pass in a custom width via a style object supplied to
panelProps
. I was a little surprised to discover that my width was not being applied.After some digging it looks like when
panelStyle
is passed into thegetSidePanelStyle
function those styles get immediately overwritten by any of the defaults defined after those styles are spread.query/packages/react-query-devtools/src/utils.ts
Lines 226 to 242 in 1c21717
I guess my question is, is that intentional? It seem to me that the common practice when providing flexibility like this is to assume that custom supplied styles will override the defaults.
Happy to open a PR if the general consensus is that styles provided via
panelProps
should override all defaults.Beta Was this translation helpful? Give feedback.
All reactions