This repository was archived by the owner on Jan 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 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: {
2929 * Defaults to 'bottom-left'.
3030 */
3131 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
3238} ) : React . ReactElement
3339
3440export function ReactQueryDevtoolsPanel ( props : {
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export function ReactQueryDevtools({
4646 closeButtonProps = { } ,
4747 toggleButtonProps = { } ,
4848 position = 'bottom-left' ,
49+ containerElement : Container = 'footer' ,
4950} ) {
5051 const rootRef = React . useRef ( )
5152 const panelRef = React . useRef ( )
@@ -94,7 +95,7 @@ export function ReactQueryDevtools({
9495 } = toggleButtonProps
9596
9697 return (
97- < div ref = { rootRef } className = "ReactQueryDevtools" >
98+ < Container ref = { rootRef } className = "ReactQueryDevtools" >
9899 { isResolvedOpen ? (
99100 < ThemeProvider theme = { theme } >
100101 < ReactQueryDevtoolsPanel
@@ -192,7 +193,7 @@ export function ReactQueryDevtools({
192193 < Logo aria-hidden />
193194 </ button >
194195 ) }
195- </ div >
196+ </ Container >
196197 )
197198}
198199
You can’t perform that action at this time.
0 commit comments