portosaurus 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/theme/Root.js +2 -11
package/package.json
CHANGED
package/src/theme/Root.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import BrowserOnly from "@docusaurus/BrowserOnly";
|
|
3
1
|
import OriginalRoot from "@theme-original/Root";
|
|
4
|
-
import { PreviewProvider
|
|
2
|
+
import { PreviewProvider } from "./components/Preview/state/index.js";
|
|
5
3
|
|
|
6
|
-
/**
|
|
7
|
-
* Wraps Docusaurus's original Root (which provides ColorModeProvider, etc.)
|
|
8
|
-
* so that PreviewViewer has access to all theme-level React contexts.
|
|
9
|
-
*/
|
|
10
4
|
export default function Root({ children }) {
|
|
11
5
|
return (
|
|
12
6
|
<PreviewProvider>
|
|
13
|
-
<OriginalRoot>
|
|
14
|
-
{children}
|
|
15
|
-
<BrowserOnly>{() => <ViewerWindow />}</BrowserOnly>
|
|
16
|
-
</OriginalRoot>
|
|
7
|
+
<OriginalRoot>{children}</OriginalRoot>
|
|
17
8
|
</PreviewProvider>
|
|
18
9
|
);
|
|
19
10
|
}
|