diff --git a/packages/docs/pages/quickstarts/common-issues.mdx b/packages/docs/pages/quickstarts/common-issues.mdx new file mode 100644 index 000000000..f6e8fef29 --- /dev/null +++ b/packages/docs/pages/quickstarts/common-issues.mdx @@ -0,0 +1,28 @@ +# Common issues with quickstarts + +## Fixing modals that overlay quickstarts + +By default, modals will be appended to the root which interferes (z-axis shenanigans) with the quickstarts drawer rendering them useless. To get around this, we'll use the `appendTo` prop for our modals by appending it to `pf-c-page.chr-c-page` instead of the root. + +For example, +```jsx +const appendTo = React.useMemo(() => document.querySelector('.pf-c-page.chr-c-page'), []); + +return ( + +); +``` + +If you have, say, a `` that's being returned, you can simply wrap it with the `appendTo` modal, + +```jsx +const appendTo = React.useMemo(() => document.querySelector('.pf-c-page.chr-c-page'), []); + +return ( + + + +); +``` + +Use [this PR](https://github.com/RedHatInsights/sources-ui/pull/1076/files) as reference for appending the model to the correct element.