Skip to content

Commit 2830b7f

Browse files
authored
docs: use warning admonition for legacyRoot (#1381)
* docs: use warning admonition for `legacyRoot` * fix admonition
1 parent e99027a commit 2830b7f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/react-testing-library/api.mdx

+6-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ your components.
107107

108108
### `legacyRoot`
109109

110-
**WARNING**: This option is only available when tests run with React 18 and earlier.
110+
:::warning
111+
112+
This option is only available when tests run with React 18 and earlier.
113+
114+
:::
111115

112116
By default we'll render with support for concurrent features (i.e.
113117
[`ReactDOMClient.createRoot`](https://reactjs.org/docs/react-dom-client.html#createroot)).
@@ -342,7 +346,7 @@ function renderHook<
342346
Props,
343347
Q extends Queries = typeof queries,
344348
Container extends Element | DocumentFragment = HTMLElement,
345-
BaseElement extends Element | DocumentFragment = Container,
349+
BaseElement extends Element | DocumentFragment = Container
346350
>(
347351
render: (initialProps: Props) => Result,
348352
options?: RenderHookOptions<Props, Q, Container, BaseElement>,
@@ -475,4 +479,3 @@ configure({reactStrictMode: true})
475479
476480
When enabled, [`<StrictMode>`](https://react.dev/reference/react/StrictMode) is
477481
rendered around the inner element. Defaults to `false`.
478-

0 commit comments

Comments
 (0)