This repository was archived by the owner on Jan 2, 2021. It is now read-only.
File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ export function ReactQueryDevtools(props: {
29
29
* Defaults to 'bottom-left'.
30
30
*/
31
31
position ?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
32
+ /**
33
+ * Use this to render the devtools inside a different type of container element for a11y purposes.
34
+ * Any string which corresponds to a valid intrinsic JSX element is allowed.
35
+ * Defaults to 'footer'.
36
+ */
37
+ containerElement ?: keyof JSX . IntrinsicElements
32
38
} ) : React . ReactElement
33
39
34
40
export function ReactQueryDevtoolsPanel ( props : {
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export function ReactQueryDevtools({
46
46
closeButtonProps = { } ,
47
47
toggleButtonProps = { } ,
48
48
position = 'bottom-left' ,
49
+ containerElement : Container = 'footer' ,
49
50
} ) {
50
51
const rootRef = React . useRef ( )
51
52
const panelRef = React . useRef ( )
@@ -94,7 +95,7 @@ export function ReactQueryDevtools({
94
95
} = toggleButtonProps
95
96
96
97
return (
97
- < div ref = { rootRef } className = "ReactQueryDevtools" >
98
+ < Container ref = { rootRef } className = "ReactQueryDevtools" >
98
99
{ isResolvedOpen ? (
99
100
< ThemeProvider theme = { theme } >
100
101
< ReactQueryDevtoolsPanel
@@ -192,7 +193,7 @@ export function ReactQueryDevtools({
192
193
< Logo aria-hidden />
193
194
</ button >
194
195
) }
195
- </ div >
196
+ </ Container >
196
197
)
197
198
}
198
199
You can’t perform that action at this time.
0 commit comments